PDA

View Full Version : Unixtime to int Month? qtmktime("M",unixtime)?



patrik08
31st May 2006, 19:53
qt4
How to get int Day , int Month from unixtime...




uint unixtime =1082370249;

QDateTime doi = QDateTime::setTime_t(unixtime);


main.cpp:30: error: cannot call member function `void QDateTime::setTime_t(uint)
' without object ??? I like to set time ....

jpn
31st May 2006, 20:00
QDateTime::setTime_t() is not a static method.



uint unixtime = 1082370249;
QDateTime doi;
doi.setTime_t(unixtime);

patrik08
31st May 2006, 20:12
Tanks ..... 1000 ....now to make its similar to php mktime i turn date 5 Hours..on code ..:(