[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-win32-users
Subject: RE: date compare in sql ???
From: Stanley.G.Martin () mail ! sprint ! com
Date: 2002-12-27 13:05:58
[Download RAW message or body]
This will get records where the date is within 30 days of today:
WHERE TO_DAYS(NOW()) - TO_DAYS(DATE_FIELD) <= 30
TO_DAYS is a function in MySql. There are a number of these type
functions.
Stanley G. Martin
Sprint - ISS Enterprise App/Decision Support Services
Stanley.G.Martin@mail.sprint.com
-----Original Message-----
From: kris [mailto:kris@intra-team.de]
Sent: Thursday, December 26, 2002 4:55 PM
To: dbi-users
Cc: Perl-Win32-Users
Subject: date compare in sql ???
Hi folks,
i hope you had an nice x-mas. Well, back in the office i have a lot
things to
do, that's more "administrative" stuff.
I know i can compare dates in a mysql table, but i have problems to do a
comand that's compares a date (added by days) whith now().
e.g:
Select... ... WHERE (startdate + $days) < now()
so how i can add $days to the database field startdays and check it with
the now() time ?
Thanx for any help
Kris
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic