DecodeDate(Date: TDateTime; var Year, Month, Day: Word);
EncodeDate(Year+1, Month+1, Day+1: Word): TDateTime;
EncodeDate(Year+1, Month+1, Day+1: Word): TDateTime;
解决方案 »
- 如何將DBGRID1資料放入DBGRID2...
- 请教,违反了Primary约束‘pk-ccmaintain’.不能在对象‘ccmaintain’中插入重复键
- stream 之间的互相拷贝问题?
- HELP,ACCESS数据库的简单查询
- 如何打印ListView中的数据,
- 从字符串中截取若干字符问题?
- 怎样使自作的浏览器不调用默认的浏览器呢
- Delphi XE5调用Tomcat SOAP出错,请各路上仙不吝赐教....
- 请问我做的程序怎么在有些计算机上自动关闭呢?
- 如何判断用户输入的值是数据
- (132分!!up有分)pardox数据库怎么会那么水呀!!我已经在程序中进行了存储,可是如果突然掉电的话,刚刚存入的数据就没有了!
- 再问一次,请问为什么打印预览能显示,但打印却没有呢?(60分)
i , j : integer;
begin
i := strtoint(edit1.Text);//当前年
j := strtoint(edit2.Text);//当前月
if j<12 then
j:= j+1
else
begin
i := i+1;
j:=1
end;
//i,j为下一月
end;
var
Present: TDateTime;
YouTime: string;
Year, Month, Day: Word;
begin
Present:= Now;
DecodeDate(Present, Year, Month, Day);
youtime:=inttostr(year)+'-'+inttostr(month)+'-'+inttostr(day)
Present:=strtodate(yourtime);
end;
Uses
DateUtils;...NewDay:=OldDay+DaysInMonth(OldDay);