fantom
15th May 2012, 16:43
Dear all,
I would like your help concerning the current Date Time acquisition. I am trying to send a message from a client to a DB server. I am structuring the message as follows:
int random = qrand() & 10000;
QString message = QString("%1 J/N " + QDateTime::currentDateTime().toString()).arg(rando m);
QByteArray msg = message.toUtf8();
QByteArray data = "MESSAGE " + QByteArray::number(msg.size()) + " " + msg;
I have no error but the final output of the date time isn't like 0000-00-00 00:00:00 as i expected, but it looks like this the message "256 J/N Di 15. Mai 17:41:39 2012".
Do you have any idea how to change it?
Thank you in advance!
I would like your help concerning the current Date Time acquisition. I am trying to send a message from a client to a DB server. I am structuring the message as follows:
int random = qrand() & 10000;
QString message = QString("%1 J/N " + QDateTime::currentDateTime().toString()).arg(rando m);
QByteArray msg = message.toUtf8();
QByteArray data = "MESSAGE " + QByteArray::number(msg.size()) + " " + msg;
I have no error but the final output of the date time isn't like 0000-00-00 00:00:00 as i expected, but it looks like this the message "256 J/N Di 15. Mai 17:41:39 2012".
Do you have any idea how to change it?
Thank you in advance!