[Gambas-user] dateadd overflow...

Stephen Bungay sbungay at ...981...
Tue Sep 6 04:55:31 CEST 2011


On 09/05/2011 10:44 PM, Stephen Bungay wrote:
> Gambas 2.23
>
>    I have three variables, all of type date.
>
> mdStartTime
> mdEndTime
> newEndTime
>
> The first two contain time values with no date portion. This was
> obtained from a function which used
>
> Time(CInt(TimeArray[0]), CInt(TimeArray[1]), CInt(TimeArray[2]))
>
> to generate the value to return. It ends up that the following get assigned;
>
> mdStartTime = 10:01:31
> mdEndTIme = 10:16:31
>
> I want to use DateAdd to get a new value based on the mdEndTime value +
> 15 minutes. To do this I used
>
> newEndTIme = DateAdd(mdEndTime, gb.minute, 15)
>
>     And promptly got an Overflow error.
>
>     Now I'm puzzled. Is there a problem with DateAdd?
>
>
> Regards
> Steve.
>
> ------------------------------------------------------------------------------
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> download Logger. Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
   I coded around the problem.... but would still like to know what the 
heck is causing the overflow.






More information about the User mailing list