Use:

select * from table where date_col between 'xxx' and 'yyy';

You need to replace XXX and YYY with the dates you want like
'20030104111130' for January 04, 2003, 11:11:30.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]

----- Original Message -----
From: "aman raheja" <[EMAIL PROTECTED]>
To: "mysql" <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 7:25 PM
Subject: comparision in the datetime field


Hi All
I have a datetime field in one of my tables in the MySQL database.
Can I do something like return all records between two certain dates, say
between Nov 02, 2002 and Nov 07, 2002.
Thanks
Aman

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to