Hi!
I enter a date in this format : d/MM/yyyy
So, I just set up the date like this :
QDate date
= QDate::fromString(sList.
at(0)+"MM"+sList.
at(1)+"yyyy"+sList.
at(2),
"d'MM'yyyy");
QStringList sList = date.split("/");
QDate date = QDate::fromString(sList.at(0)+"MM"+sList.at(1)+"yyyy"+sList.at(2), "d'MM'yyyy");
To copy to clipboard, switch view to plain text mode
But there is a problem when I want to compare dates :
if (date.toString("d'MM'yyyy") == finfo.lastModified().toString("d'MM'yyyy")) {
//Some code.
}
if (date.toString("d'MM'yyyy") == finfo.lastModified().toString("d'MM'yyyy")) {
//Some code.
}
To copy to clipboard, switch view to plain text mode
It doesn't enter into the if,
Bookmarks