您如果想得到日期数据为什么不这样:
var
Present:Tdate;
Year,Month,day :Word;
StrYear,strMonth,StrDay :String;
begin
Present:=DBEdit1.Text;
DecodeDate(Present,Year,Month,Day);
//StrToDateTime(present)
if Day<10 then
StrDay :='0'+IntToStr(Day)
else
StrDay :=IntToStr(Day);
if Month<10 then
StrMonth :='0'+IntToStr(Month)
else
StrMonth :=IntToStr(Month);
StrYear :=IntToStr(Year);
DayLabel.Caption :=StrYear +'年'+StrMonth +'月' + StrDay + '日';
var
Present:Tdate;
Year,Month,day :Word;
StrYear,strMonth,StrDay :String;
begin
Present:=DBEdit1.Text;
DecodeDate(Present,Year,Month,Day);
//StrToDateTime(present)
if Day<10 then
StrDay :='0'+IntToStr(Day)
else
StrDay :=IntToStr(Day);
if Month<10 then
StrMonth :='0'+IntToStr(Month)
else
StrMonth :=IntToStr(Month);
StrYear :=IntToStr(Year);
DayLabel.Caption :=StrYear +'年'+StrMonth +'月' + StrDay + '日';
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货