I have the following region of data being read into a QDataStream object :
DE 07 05 19 0E 28 1A
This should translate to the date/time: 25-05-2014 15:40:26
I am trying to use the following to read this into a QDateTime variable:
QFile fileIn(iFile);
if (!fileIn.open(QIODevice::ReadOnly)) return;
QDataStream data(&fileIn);
data.setByteOrder(QDataStream::LittleEndian);
data.setVersion(QDataStream::Qt_5_0);
data.skipRawData(32);
.
.
QDateTime time;
data >> time;
qDebug () << time.date();
Instead I get null/blank in time. Output is:
QDate("")