如何将日期转换为水晶报表中的单词 [英] How to convert date to words in crystal report

查看:65
本文介绍了如何将日期转换为水晶报表中的单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的日期包含25-09-1990之类的值。我想用Twenty Fifth September Nineteen Ninety这样的词来转换它。



如果日期包含像02-02-2010那么它应该显示像二月二号二千元..





请帮助别人............



我的尝试:



............. ....................................

I have a date which contains value like 25-09-1990. I want to convert it in words like "Twenty Fifth September Nineteen Ninety"..

If date contains like 02-02-2010 then it should show like Second February Two Thousand Ten..


Please help someone............

What I have tried:

.................................................

推荐答案

这是一篇关于将数字转换为单词的文章将数字转换为等效的单词。 [ ^ ]



这个月显然是一个简单的查找或使用 dt.ToString(MMMM); dt.ToString(MMM);



请记住将年份拆分为CC然后YY之前使用数字到单词代码,得到Nineteen Ninety。如果你想要使用不同的单词,你必须有2000年以后的替代逻辑。
Here is an article on converting numbers to words Converting numbers to the word equivalent. [^]

The month is obviously a simple lookup or use dt.ToString("MMMM"); or dt.ToString("MMM");

Remember to split the year into CC then YY before using the numbers to words code, to get the "Nineteen Ninety". You'll have to have alternative logic for 2000 onwards if you want different words used.


这篇关于如何将日期转换为水晶报表中的单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆