全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:3421
推到 Plurk!
推到 Facebook!

請問如何將秒數轉換成時分秒,有無現成的函式可使用?

尚未結案
nlj859
資深會員


發表:139
回覆:375
積分:322
註冊:2004-03-20

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-08-27 18:36:41 IP:163.28.xxx.xxx 未訂閱
請問除了自己處理一個秒數換算成月日年時分秒之外,有無現成的函式可使用? 謝謝. 發表人 - nlj859 於 2004/08/27 18:39:10
justdo
高階會員


發表:2
回覆:359
積分:222
註冊:2004-08-17

發送簡訊給我
#2 引用回覆 回覆 發表時間:2004-08-27 19:33:48 IP:221.169.xxx.xxx 未訂閱
c 語言有提供,請查查 time(), gmtime(), localtime() 的用法 BCB是有另外提供一個 TDateTime 類別 不過沒辦法直接把秒轉成你要的東西...
hornacek
一般會員


發表:29
回覆:76
積分:21
註冊:2004-02-02

發送簡訊給我
#3 引用回覆 回覆 發表時間:2004-08-28 02:09:55 IP:220.139.xxx.xxx 未訂閱
取自BCB的Help... TDateTime::DecodeDate Separates the TDateTime value into year, month, and day values and stores these values in the year, month, and day parameters, respectively. void __fastcall DecodeDate(unsigned short* year, unsigned short* month, unsigned short* day) const; Description Use DecodeDate() when you need to access the year, month, or day of a TDateTime object? date portion. ------------------------------------------------------------------------------------------ TDateTime::DecodeTime Separates the TDateTime value into hour, minute, second, and millisecond values and stores these values in the hour, min, sec, and msec parameters, respectively. void __fastcall DecodeTime(unsigned short* hour, unsigned short* min, unsigned short* sec, unsigned short* msec) const; Description Use DecodeTime() to access the hour, minute, second, or millisecond values of the TDateTime object? time portion.
andychang1690
資深會員


發表:20
回覆:694
積分:442
註冊:2003-03-14

發送簡訊給我
#4 引用回覆 回覆 發表時間:2004-08-28 02:24:43 IP:61.142.xxx.xxx 未訂閱
引言: 請問除了自己處理一個秒數換算成月日年時分秒之外,有無現成的函式可使用? 謝謝. 發表人 - nlj859 於 2004/08/27 18:39:10
nlj859:一天38400秒,你所謂秒數換算成月日年時分秒 就我所知是所有C語言系列沒有現成函數可用!自己寫。或引用其他人現成! Andy Chang
------
Andy Chang
系統時間:2024-06-22 18:55:53
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!