PB5.20b14 ParseDate() returns -1

Just starting out? Need help? Post your questions and find answers here.
JJ
User
User
Posts: 23
Joined: Fri Feb 16, 2007 12:41 am
Location: Paris, France

PB5.20b14 ParseDate() returns -1

Post 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
Fred
Administrator
Administrator
Posts: 18263
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

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

Post by Fred »

It's not a bug, the parsed date has to be the same format than the mask.
Post Reply