[Gambas-user] DateAdd function

Benoit Minisini gambas at ...1...
Mon Aug 16 11:42:31 CEST 2004


On Sunday 15 August 2004 09:26, VBTricks.de.vu Webmaster wrote:
> Hi Benoit,
>
> I read your comment. As I do not have the MSDN available under Linux, I
> tried adding years using "y" as intervall. With "yyyy" it works. But
> when trying to add months to a date, the function fails.
>
> My source:
> Dim NextDate As Date
> NextDate = CDate("10/03/03") ' October 3rd, 2003
> NextDate = vb.DateAdd("m", 2, NextDate)
>
> 'should return December 3rd, 2003
>
> Error displayed: "Invalid Date Returned"
>
> But this date does exist!
>
> So where's the fault?

I fixed it, here is a patch. Put it in ./src/lib/vb

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vbdate.c
Type: text/x-csrc
Size: 6280 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20040816/8d786895/attachment.c>


More information about the User mailing list