Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

請問在delphi中的日期變數?

0 views
Skip to first unread message

乾坤國寶

unread,
Jun 1, 2001, 3:47:57 AM6/1/01
to

請問如何不省略月、日前面的0?

例︰ 2001/5/3 → 2001/05/03

謝謝!

>
--
* Origin: ★ 交通大學資訊科學系 BBS ★ <bbs.cis.nctu.edu.tw: 140.113.23.3>

hou_zemin

unread,
Jun 3, 2001, 1:35:13 PM6/3/01
to
如果你找遍,而不存在那樣的函式的話,就自己寫(判斷字長):

if( length(str)=2) then str := '0'+str;

hou_zemin

unread,
Jun 3, 2001, 1:35:27 PM6/3/01
to
如果你找遍,而不存在那樣的函式的話,就自己寫(判斷字長):

if( length(str)<>2) then str := '0'+str;

百分百的天蠍座

unread,
Jun 4, 2001, 3:47:58 PM6/4/01
to
※ 引述《lious...@bbs.cis.nctu.edu.tw (乾坤國寶)》之銘言:

> 請問如何不省略月、日前面的0?
> 例︰ 2001/5/3 → 2001/05/03
> 謝謝!
用FormateDateTime這個function...
--
我喜歡拼命的 [32;5m跳舞 [0m
我還我還喜歡 [36;5m大風吹 [0m
我喜歡 [31;5m風車 [0m [34;5m頭轉 [0m [35;5m前撲 [0m [33;5m後翻 [0m擱兼 [31;5m劈腿 [0m
--
[1;32m※ Origin: [33m台灣科大電子站 [37m<bbs.et.ntust.edu.tw> [m
[1;31m◆ From: [36m61.216.25.109 [m
0 new messages