本文整理自网络,侵删。

uses DateUtils;
procedure TForm1.MonthCalendar1Click(Sender: TObject);begincaption:= YearOf(MonthCalendar1.Date).ToString + '-' + MonthOfTheYear(MonthCalendar1.Date).ToString + '-' + DayOfTheMonth(MonthCalendar1.Date).ToString;//caption:=DateTimeToStr(MonthCalendar1.Date);end;
相关阅读 >>
Delphi get_hd_serial() 获得磁盘驱动器序列号
Delphi 自动把combobox控件的内容里没有的内容加入列表中
Delphi xe 共享一个之前封装的多进程共享内存的memorystream
Delphi pchar和array [0..255] of char的区别
更多相关阅读请进入《Delphi》频道 >>