10-09-2013 11:16 AM - last edited on 10-09-2013 11:55 AM by Chronos
i'm in front of my next problem, want to edit the timeformat as is should say how many time since the last update past,
i mean instead of 2013-10-08T17:27:59.745Z 1 if the lastUpdate was yesterday, 2 for the day before yesterday and so on.
that means that i have to compare it to the current date but i dont know how i can get access to the lastUpdate Variant in my Map.
QMap(("weather", QVariant(QVariantList, (QVariant(QVariantMap, QMap(("citydocid", QVariant(QString, "") ) ( "id" , QVariant(qlonglong, 94) ) ( "city" , QVariant(QString, "test") ) ( "lastUpdate" , QVariant(QString, "2013-1008T17:23:39.154Z") ) ) ) ) )
Hope you can help me again.
thanks in advance
Subject Title edited to reflect new topic.
10-09-2013 11:39 AM - last edited on 10-09-2013 12:12 PM by Chronos
One problem per thread please, please post your new problem as a new thread.
[Edit] If you click on the link 'Report inappropriate content' next to the message above you can then ask a moderator to split the thread for you. This is a better way to do it to avoid replication.
[Edit 2] Please don't open a new thread as I've asked the moderator to split the thread.
10-09-2013 11:43 AM - last edited on 10-09-2013 12:12 PM by Chronos
10-09-2013 11:53 AM - last edited on 10-09-2013 12:12 PM by Chronos
Yes so as per my earlier suggestion I recommend converting it to a QDateTime and then you can use the functions within that to help you...
10-09-2013 11:55 AM - last edited on 10-09-2013 12:12 PM by Chronos
Before @Zmey chips in with it you can also use QML's date object...
Personally I prefer to work with QDateTime it's more extensive.
10-09-2013 12:16 PM