[Gambas-user] BUG: Problem with DateAdd function

George gambas at ...2377...
Sat Dec 4 22:50:59 CET 2010


2010/12/4 Benoît Minisini <gambas at ...1...>:
>> >
>> > Gambas 2.19/64 Suse11.3 locale Hong Kong:
>> >
>> > PRINT DateAdd(CDate("2/13/2010"), gb.month, -36)
>> > PRINT DateAdd(CDate("3/28/2010"), gb.month, -37)
>> > PRINT DateAdd(CDate("4/13/2010"), gb.month, -38)
>> > produces
>> > 13/02/07
>> > 28/02/07
>> > 13/02/07
>> >
>> > whereas
>> > PRINT DateAdd(CDate("1/13/2010"), gb.month, -36)
>> > PRINT DateAdd(CDate("2/28/2010"), gb.month, -37)
>> > PRINT DateAdd(CDate("3/13/2010"), gb.month, -38)
>> > all produce an invalid date error.
>> >
>> > Regards
>> > Werner
>>
>> Forgot to mention it works in Gambas3 version 3293.
>>
>
> All that is normal, as the bug has been fixed in 2.20!
>
> Regards,
>
> --
> Benoît Minisini
>

But then why am I getting the 'invalid date' error in 2.22?  And more
importantly, what do I need to do to correct it?




More information about the User mailing list