lvhaiyan 发表于 2004-4-15 11:57:00

[ARX]CAD的日期怎么能转变为标准的时间格式

CAD的日期怎么能转变为标准的时间格式

Student 发表于 2004-4-16 15:45:00

1。取ACAD的CDATE系统变量,代码为:


        struct resbuf rb;<BR>        acedGetVar("CDATE", &amp;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(&amp;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>供参考。

easypower 发表于 2004-4-23 18:26:00

AcDbDate類可以
页: [1]
查看完整版本: [ARX]CAD的日期怎么能转变为标准的时间格式