丄諦啲仇魜ヤ
如 果 敌 人 让 你 生 气 , 那 说 明 你 没 有 胜 他 的 把 握!
posts - 6,comments - 56,trackbacks - 1
运行select to_char(to_date('911','J'),'Jsp') as a from dual
显示结果为:Nine Hundred Eleven
而运行select to_date('911','J') as a from dual
显示结果为:0000-0-0

关于to_date(numberstring,'J')和to_char后面的那个"Jsp"各有什么作用?


J:Julian day; the number of days since January 1, 4712 BC. Number specified with 'J' must be integers.
SP:Spelled Number
他的做法是先把数字转为一个数字,然后再转换回来,加上SP,就可以拼写出这个数字了。

posted on 2008-04-24 15:35 Crying 阅读(642) 评论(0)  编辑  收藏 所属分类: 数据库

只有注册用户登录后才能发表评论。


网站导航: