Converting Unix Time given in string to QDateTime
The code snippet shows how we can convert a unix time value stored in a QString to a corresponding value in QDateTime.
Article Metadata
Tested with
SDK: Nokia Qt SDK 1.1.3
Devices(s): N9, N950
Compatibility
Platform(s): Qt, all versions
Article
Keywords: QDateTime
Created: vineet.jain
(15 Dec 2011)
Last edited: hamishwillee
(11 Oct 2012)
Headers required
#include <QDateTime>Source
Postconditions
The unix time value got successfully converted to : 07 Dec 2011 16:30:00

