Hello Benoît

> Unix time stamp is a number of seconds since 1/1/1970.
>
> So to convert a Gambas date to Unix timestamp:
>
>       Print DateDiff(CDate("1/1/1970"), Now, gb.Second)
>
> And to convert an Unix timestamp to Gambas date:
>
>       Print DateAdd(CDate("1/1/1970"), TimeStamp, gb.Second)
>

After swapping the last two arguments of DateAdd it works as expected.
Perhaps this could be a note in the documentation of Gambas.

Many Thanks
Rolf

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to