请教一个简单的问题(DateTimePicker) 怎样把 TDateTimePicker中的年月日分别放到Label1、Label2、Label3的caption中去 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用DateTimePicker1.Date().Decode()将年月日解出来,解到三个变量里,再给Label的caption赋值! var wyear,wmonth,wday:word;begin DecodeDate(DateTimePicker1.Date,wyear,wmonth,wday); Label1.Caption:=IntToStr(wyear)+'年'; Label2.Caption:=IntToStr(wmonth)+'月'; Label3.Caption:=IntToStr(wday)+'日';end; 我的办法s:=formatFloat('yyyy-m-d',DateTimePicker1.Datetime)然后再分别读出来,哈哈 oracle_lover先生:在XP下怎样安装 8i ????????我无法成功呀! s1:=formatFloat('yyyy',DateTimePicker1.Datetime)s2:=formatFloat('m',DateTimePicker1.Datetime)s3:=formatFloat('d',DateTimePicker1.Datetime) 关于Record数据求助 语法解释 Incompatible types等问题 Delphi图象截取编程示例,D7运行通过 sql语句 dxDbgrid排序后的事件是什么呢? 为什么Form打开很慢? DELPHI7中BDE Administrator的使用。 这样的sql怎么写 优秀程序员请进! 我想要一個mts\com+的例子﹐ 打包后出现下列提示,是什么原因?
DateTimePicker1.Date().Decode()
将年月日解出来,解到三个变量里,再给Label的caption赋值!
wyear,wmonth,wday:word;
begin
DecodeDate(DateTimePicker1.Date,wyear,wmonth,wday);
Label1.Caption:=IntToStr(wyear)+'年';
Label2.Caption:=IntToStr(wmonth)+'月';
Label3.Caption:=IntToStr(wday)+'日';
end;
s2:=formatFloat('m',DateTimePicker1.Datetime)
s3:=formatFloat('d',DateTimePicker1.Datetime)