datetimepicker控件取得的日期怎么分离年月日三项为strYear,strMonth,strDay?
谢谢!~~~
谢谢!~~~
解决方案 »
- delphi ADODataSet 显示字段包含内容
- delphi如何在数据库插入特定的数字编号
- 数据库登录问题
- 一个用timage显示数据库图片的问题
- spcomm!!!!rs232
- 如何获得当前dbgrid中选中的一条记录
- Delphi与数据库
- 高分求救!为何用quickreport做的报表里面subdetialband会不触发onneeddata事件?
- 请问,这函数是关于ACR122的读和写的函数吗?
- 当一个程序正在运行时,如何使本程序关闭。
- 请问将来.Net平台下,用Delphi开发webService的方式有哪些?
- 做OCX后,在客户端可不可以不要midas.dll?有什么办法解决呢?
Year, Month, Day: Word;
begin
DecodeDate(datetimepicker.date, Year, Month, Day)
end;
Present: TDateTime;
Year, Month, Day: Word;
begin
Present:= Now;
DecodeDate(Present, Year, Month, Day);
end;
DateUtilsfunction YearOf(const AValue: TDateTime): Word;
function MonthOf(const AValue: TDateTime): Word;
function WeekOf(const AValue: TDateTime): Word;
function DayOf(const AValue: TDateTime): Word;
function HourOf(const AValue: TDateTime): Word;
function MinuteOf(const AValue: TDateTime): Word;
function SecondOf(const AValue: TDateTime): Word;
function MilliSecondOf(const AValue: TDateTime): Word;
也可以用截取字符串的形式得到你想要的形式
[email protected]
谢谢了~~~
DecodeDate(datetimepicker.date, Year, Month, Day)