获取系统时间

Windows API:
void GetSystemTime(LPSYSTEMTIME lpSystemTime);


CB:
Now();
DateTimeToStr(Now());
Now()=Date()+Time();

TDateTime   myDataTime;  
myDataTime.CurrentDate();//返回当前日期  
myDateTime.CurrentTime();//返回当前时间

void gettime(struct time *timep);
void settime(struct time *timep);
struct time {
   unsigned char ti_min;      /* minutes */
   unsigned char ti_hour;     /* hours */
   unsigned char ti_hund;     /* hundredths of seconds */
   unsigned char ti_sec;      /* seconds */
};


VC:
CTime类

 

你可能感兴趣的:(windows,Date,struct,api)