Reputation: 80
Expected : I want to comapre these two dates without seconds. Eg
'2011-12-30 09:55:56', '2011-12-30 08:55:55' comparison of these two should return TRUE.
'2011-12-30 09:55:56', '2011-12-30 08:54:55' comparison of these two should return FALSE.
Upvotes: 1
Views: 1970
Reputation:
Use date_trunc()
and "round" the values to minutes:
date_trunc('minute', timestamp '2011-12-30 08:55:56') = date_trunc('minute', timestamp '2011-12-30 08:55:55')
Upvotes: 7