Click to See Complete Forum and Search --> : How to get Two day before date


contactrajiv08
06-01-2007, 02:46 AM
I want to get two day before date, that will be use in mysql query to get two day before data from current date.

kiwibrit
06-01-2007, 03:02 AM
That's a php issue, not an html one. My first thoughts would be to build something around getdate (http://uk3.php.net/manual/en/function.getdate.php). But you're more likely to get a clued up response in the php section of the forum. Maybe a mod will move this post there.

bokeh
06-01-2007, 02:00 PM
Do it at query level:SELECT something FROM tbl_name WHERE DATE_SUB(CURDATE(),INTERVAL 2 DAY) = date_col