Brian Menke wrote:
Hi everyone, I've always had a challenge working with dates. I'm building an app that needs to query a range of dates. I'm using ASP (for the first time, I usually write in Java). Anyway my date column uses the 0000-00-00 format, which I think is the default format? Is it?
Thats the ISO date format, an unambiguous format for date.

I've read different approaches doing a google search, but am more confused than ever. I have used several date functions in java, but want to know if I can somehow use date functions in a regular sql query to somehow reformat the dates so I can query a range of dates. Does that make sense? Can someone give me an example of how to do this please? I'm sure people do this all the time, but it confuses the heck outta me :-)
If you want to query a range of dates you can do something like this:
select * from tbl where
datfield < "2005-01-06" and datfield > "2004-12-01"
For more information about date-/time-functions see the excellent manual: http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html



Thanks!



-Brian Menke

HTH,
Wolfram


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to