cancer10
08-28-2008, 08:32 AM
Hey,
How do I get the nearest date/time row populated using sql?
The datatype for this date field is "datetime"
I tried the folowing, but does not work properly
select YourDateField from yourTable where yourDateField <= date(now())
Even a search in Google (http://www.google.co.in/search?hl=en&safe=off&client=firefox-a&rls=org.mozilla:en-US:official&q=mysql+fetch+nearest+date&start=0&sa=N) didnt help :(
Please help.
Thanx
How do I get the nearest date/time row populated using sql?
The datatype for this date field is "datetime"
I tried the folowing, but does not work properly
select YourDateField from yourTable where yourDateField <= date(now())
Even a search in Google (http://www.google.co.in/search?hl=en&safe=off&client=firefox-a&rls=org.mozilla:en-US:official&q=mysql+fetch+nearest+date&start=0&sa=N) didnt help :(
Please help.
Thanx