RSS匡堋 | 停兆誘後
艇議了崔利嫋遍匈 > 扮寂 > 屎猟

delphi DateOf、TimeOf、YearOf、MonthOf、WeekOf、DayOf、HourOf、MinuteOf、SecondOf、MilliSecondOf C 戻函扮寂撹蛍

恬宀admin 栖坿 晩豚2013/10/10 20:07:50 繁賑 炎禰

万断議歌方脅頁匯倖 TDateTime,
DateOf、TimeOf 蛍艶戻函晩豚嚥扮寂, 旺卦指 TDateTime 窃侏;
YearOf、MonthOf、WeekOf、DayOf、HourOf、MinuteOf、SecondOf、MilliSecondOf 卦指議脅頁 Word 窃侏.

unit Unit1;interfaceuses  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,  Dialogs;type  TForm1 = class(TForm)    procedure FormCreate(Sender: TObject);  end;var  Form1: TForm1;implementation{$R *.dfm}uses DateUtils;procedure TForm1.FormCreate(Sender: TObject);var  dt,d,t: TDateTime;  Year,Month,Week,Day,Hour,Minute,Second,MilliSecond: Word;begin  dt := StrToDateTime('2009-5-20 11:22:33');  d := DateOf(dt);  ShowMessage(DateToStr(d)); //2009-5-20  t := TimeOf(dt);  ShowMessage(TimeToStr(t)); //11:22:33  Year        := YearOf(dt);  Month       := MonthOf(dt);  Week        := WeekOf(dt);  Day         := DayOf(dt);  Hour        := HourOf(dt);  Minute      := MinuteOf(dt);  Second      := SecondOf(dt);  MilliSecond := MilliSecondOf(dt);  ShowMessageFmt('%d,%d,%d,%d,%d,%d,%d,%d', [Year,Month,Week,Day,Hour,Minute,    Second,MilliSecond]); {2009,5,20,11,22,33,0}end; //www.3464.comend.

響頼宸鐙猟嫗朔艇伉秤泌採
0
0
0
0
0
0
0
0
云猟利峽