I want to parse an incomming text to a date format.It seems that Qt, can't handle this kind of date.
I have this dates
20-Nov-200205-Mar-200309-Apr-200323-Jul-200327-Aug-200301-Oct-200305-Nov-2003and when i do
x.append( QDate.fromString( fld.name(), "dd-MMM-yyyy").toPyDate() ) print xi obtain this:
[datetime.date(2002, 11, 20), datetime.date(2003, 3, 5), datetime.date(60823, 1, 1), datetime.date(2003, 7, 23), datetime.date(60823, 1, 1), datetime.date(60823, 1, 1), datetime.date(2003, 11, 5)]and i need this :
[datetime.date(2002, 11, 20), datetime.date(2003, 3, 5), datetime.date(2003, 04, 09), datetime.date(2003, 07, 23), datetime.date(2003, 08, 27), datetime.date(2003,10, 1), datetime.date(2003, 11, 5)]Some dates works but for example to the date 09-Apr-2003 the result is datetime.date(60823, 1, 1) and i want datetime.date(2003, 04, 09)
Are there any restrictings on QDate::fromString()?If yes, please tell me where I can find them.
Thanks in advance.
أكثر...
I have this dates
20-Nov-200205-Mar-200309-Apr-200323-Jul-200327-Aug-200301-Oct-200305-Nov-2003and when i do
x.append( QDate.fromString( fld.name(), "dd-MMM-yyyy").toPyDate() ) print xi obtain this:
[datetime.date(2002, 11, 20), datetime.date(2003, 3, 5), datetime.date(60823, 1, 1), datetime.date(2003, 7, 23), datetime.date(60823, 1, 1), datetime.date(60823, 1, 1), datetime.date(2003, 11, 5)]and i need this :
[datetime.date(2002, 11, 20), datetime.date(2003, 3, 5), datetime.date(2003, 04, 09), datetime.date(2003, 07, 23), datetime.date(2003, 08, 27), datetime.date(2003,10, 1), datetime.date(2003, 11, 5)]Some dates works but for example to the date 09-Apr-2003 the result is datetime.date(60823, 1, 1) and i want datetime.date(2003, 04, 09)
Are there any restrictings on QDate::fromString()?If yes, please tell me where I can find them.
Thanks in advance.
أكثر...