All Forums Database
omerf 3 posts Joined 10/15
10 Jun 2016
Getting YYYYMMDDHH FORMAT

Hi,
I have column which name is Start_Time and it includes '4/26/2016 18:14:57.000000' .  i want to take 2016042618 output (YYYYMMDDHH). How can i get it ? 
 
Thank you.
 

Tags:
dnoeth 4628 posts Joined 11/04
10 Jun 2016

The simple way:

to_char(Start_Time, 'YYYYMMDDHH24')

 
 

Dieter

You must sign in to leave a comment.