Le 03/02/2012 15:48, Rolf Schmidt a écrit :
>
> @Ron.
> Your Module is excellent, but I can't belief, that a programming
> language for the UNIX-environment isn't able to handle timestamps only
> after "reinventig the wheel".
> I think, we shoud ask Benoit why he didn't implement such a function or
> where he hide the information.
>
> Rolf.
>

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)

-- 
Benoît Minisini

------------------------------------------------------------------------------
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