Page 1 of 1

PB5.20b14 ParseDate() returns -1

Posted: Thu Aug 29, 2013 7:50 am
by JJ
Hello,

As discuss in other topic (http://www.purebasic.fr/english/viewtop ... te#p422624), I find a difference between Pb5.11 and Pb5.20 if you don't describe all parameters of the date to parse, the ParseDate() returns -1.

Perhaps it's normal, but I prefer that Pb5.11 do, all parameters not describe is equal to 0.
Is it possible to come back as do by the version Pb5.11?

Code: Select all

Debug ParseDate("%yyyy-%mm-%dd %hh:%ii:%ss","2013-04-24 15:02:30");works fine and return 1366815750 in Pb5.11 and Pb5.20
Debug ParseDate("%yyyy-%mm-%dd","2013-04-24 15:02:30")            ;return -1 with Pb5.20b14 and 1366761600 in Pb5.11

Re: PB5.20b14 ParseDate() returns -1

Posted: Thu Aug 29, 2013 11:13 am
by Fred
It's not a bug, the parsed date has to be the same format than the mask.