Getting YYYYMMDDHH FORMAT

Database
Fan

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 (1)
1 REPLY
Senior Apprentice

Re: Getting YYYYMMDDHH FORMAT

The simple way:

to_char(Start_Time, 'YYYYMMDDHH24')