Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Rounding up to nearest hour

$
0
0
Hi Everyone,

I would like to how to roundup the time for a date/time value.

e.g 7:30am would be shown as 8:00am. Below I had to format the time fields but I am not sure how to incorporate the round() function.

Code:


 DECODE(
        TO_CHAR
                (
                TO_DATE
                        (SSRMEET_BEGIN_TIME,'HH24:MI'),'HH:MI pm'
                )||'-'||
                      TO_CHAR
                        (
                        TO_DATE
                                (SSRMEET_END_TIME,'HH24:MI'),'HH:MI pm'
                        ),'-','TBA',
                        TO_CHAR
                                (TO_DATE
                                        (SSRMEET_BEGIN_TIME,'HH24:MI'),'HH:MI pm'
                                )||'-'||
                              TO_CHAR
                                (
                                TO_DATE
                                        (SSRMEET_END_TIME,'HH24:MI'),'HH:MI pm'
                                )
        )


Viewing all articles
Browse latest Browse all 13329

Trending Articles