Skip to Main Content

SQL & PL/SQL

Rounding Time to nearest 30 minutes

Gary FDec 28 2009 — edited Jan 2 2010
Good day,

I'm looking for a way to round the time portion of a date value. My query needs to return the time of day, rounded to the nearest 30 minutes - top of the hour or bottom of the hour.

If sysdate is: 12/28/2009 11:08:19 AM
I need to see: 12/28/2009 11:00:00 AM

If sysdate returns: 12/28/2009 11:18:19 AM
I need to see: 12/28/2009 11:30:00 AM

Any help is appreciated.

Regards,

Gary F.
This post has been answered by Frank Kulash on Dec 28 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 30 2010
Added on Dec 28 2009
12 comments
46,154 views