How convert time in string to QDateTime
Solved
General and Desktop
-
Hm, your code should work, it's correct.
Try this:
QDateTime time = QDateTime::fromString("2019-03-12T03:24:30.282Z", Qt::ISODateWithMs);
-
@sierdzio said in How convert time in string to QDateTime:
Hm, your code should work, it's correct.
Huh, nope I read it wrongly. You've mixed the characters a bit.
QDateTime time = QDateTime::fromString("2019-03-12T03:24:30.282Z","yyyy-MM-ddTHH:mm:ss.zzzZ");