var mydate : tdatetime; tmpstr : string; tmpint : integer;
begin 【程序编程相关:利用Delphi中的画布画树】 【推荐阅读:DELPHI中动态获得SQLSERVER】 mydate := strtodatetime(2003-12-01); 【扩展信息:Pascal精要笔记】 tmpstr := formatdatetime(yyyy mmmm,mydate); tmpint := daysinmonth(mydate); showmessage(tmpstr + 有 + inttostr(tmpint) + ìì); end; 改变系统时间 1.定义变量 var systemtime: tsystemtime; 2.转换日期 datetimetosystemtime(strtodatetime(1999-09-01 11:12:12 ),systemtime); 3.改变系统日期 setsystemtime(systemtime); 到此系统日期已经改变,可是由于api函数setsystemtime()本身存在的bug, 在你改变系统日期以后,等待一会,你会看到系统的日期是对的,可是时间却错了, 并不是我们设定的11:12:12,这样的问题看来需要微软才能解决了///////////////////// 方法二 /////////////////////////
{ setdate sets the current date in the operating system. valid } { parameter ranges are: year 1980-2099, month 1-12 and day } { 1-31. if the date is not valid, the function call is ignored. } ... 下一页