hi,
i have a weird problem regarding on QDate. this is the code :
Qt Code:
To copy to clipboard, switch view to plain text mode
when i tried to display it again using date.toString("MMMM dd yyyy") = September 14 1752. what happened to my date?
hi,
i have a weird problem regarding on QDate. this is the code :
Qt Code:
To copy to clipboard, switch view to plain text mode
when i tried to display it again using date.toString("MMMM dd yyyy") = September 14 1752. what happened to my date?
Last edited by xeroblast; 7th December 2010 at 05:01.
The conversion failed. You are telling QDate::fromString() to use the format Qt::TextDate but feeding in a date that is not in that format. You want to adjust your string format, or use the other variant of the fromString() method and specify how the string should be interpreted.
yeah.. thanx for the reply. it should be : QDate date = QDate::fromString(strDate, "MMMM dd, yyyy"). the Qt::TextDate must be the correct format of the string date.
Bookmarks