开发者

DB2: converting date values to varchar

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 开发者_StackOverflow中文版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


Try this:

VARCHAR_FORMAT(DATE, 'MON DD YYYY')

VARCHAR_FORMAT

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜