PDA

View Full Version : Convert ColeDateTime from VS6.0



emp1953
8th March 2018, 19:37
I am porting a project from Microsoft Visual Studio 6.0 c++ to Linux c++ in the Qt environment. Qt4.8.5

I am having trouble with these two particular lines of code from that project.

COleDateTime old_time(1900,1,1,0,0,1);
DATE old = old_time;


In Qt what are the equivalent syntax to accomplish this same thing. Nothing jumps out at me in any of the documentation.
would old_time above become an instance of the time_t struct, with the arguments populating members of that struct??

Any details would be appreciated.

Thank You
emp

Lesiok
9th March 2018, 06:48
QDateTime old_time(QDate(1900,1,1),QTime(0,0,1));
QDate old = old_time.date();