>SELECT * FROM RO > WHERE DATETIME(TRIM(STR(DatePart(Year,Last_Date)))+'-'+TRIM(STR(DatePart(Month,Last_Date )))+'-'+ > TRIM(STR(DatePart(Day,Last_Date )))+' '+Last_Time)>DATETIME('2000-01-01 00:00:00') >This is not a good way, but can you explain again what you were trying to achieve and what is the table structure, some input data and desired output?