[ARX]CAD的日期怎么能转变为标准的时间格式
CAD的日期怎么能转变为标准的时间格式 1。取ACAD的CDATE系统变量,代码为:struct resbuf rb;<BR> acedGetVar("CDATE", &rb);<BR> double tt = rb.resval.rreal;<BR> CString cs;<BR> cs.Format("%f", tt);<BR>cs中为年月日.时分秒
2.直接用VC的GetLocalTime()函数,代码为:
CString csYear, csMonth, csDay, csHour, csMinute;<BR> SYSTEMTIME LocalTime; // system time<BR> GetLocalTime(&LocalTime);
//提取年月日时分<BR> csYear.Format("%d", LocalTime.wYear);<BR> csMonth.Format("%d", LocalTime.wMonth);<BR> csDay.Format("%d", LocalTime.wDay);<BR> csHour.Format("%d", LocalTime.wHour);<BR> csMinute.Format("%d", LocalTime.wMinute);<BR>供参考。 AcDbDate類可以
页:
[1]