DB2: converting date values to varchar
17,355
Try this:
VARCHAR_FORMAT(DATE, 'MON DD YYYY')
Related videos on Youtube
Author by
Kumar Alok
B.Tech in Computer Science and Engineering from IT-BHU. BELL LABS , INDIA Summer Intern 2010.
Updated on June 04, 2022Comments
-
Kumar Alok almost 2 years
I am new to databases, in fact this is first time.
I want to select the date column from a table and the date to be printed as an output in some given format, like is there a way i can specify the format of output of this conversion.
eg:
date: 01/01/2011
output :
Jan 1 2011
or
1st January 2011
Is there a function or way to do so? My guess is there must be?
Thanks