If i have the following table and TODAY is 11/Dec/2004 and time is 08hrs
----------------------------------------
Sno | Timestamp_Column |
----------------------------------------
1 | 2004-11-23 12:32:22 |
2 | 2004-10-15 13:00:12 |
3 | 2004-12-23 02:32:22 |
4 | 2004-12-11 06:32:22 |
5 | 2004-12-11 09:32:22 |
----------------------------------------
I should get only those first 3 rows.
i got the date part of the currenttime by converting the 'CURRENT TIMESTAMP' as below,
DATE(CURRENT TIMESTAMP).
and the compared it with the timestamp_column as follows.
SELECT * from Vacation vac
where
(timestamp_column) >= DATE(CURRENT TIMESTAMP))
As the two columns are of different datatypes, i am not able to compare them
Is there any other way to do it.
In simple i want all those rows dated yesterday and before.
-gopidba