开发者

Convert a date in words

开发者 https://www.devze.com 2023-02-05 23:16 出处:网络
Hi am having a date like \'01-01-2010开发者_运维问答\' and i want to convert that date into words like

Hi am having a date like '01-01-2010开发者_运维问答' and i want to convert that date into words like

First January Twenty Thousand Ten

so how can i convert the date into words in tsql


Using built-in method you can convert only month and day of week to string:

select DATENAME (month, GETDATE()), DATENAME (weekday, GETDATE()), 

returns:

January, Thursday

Other parts - impossible. You should roll a custom dictionary

0

精彩评论

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