[Gambas-user] How to convert unix timestamp into gambas date and time

Randall Morgan rmorgan62 at ...626...
Fri Feb 3 11:09:24 CET 2012


I haven't tried it but try passing the nix time stamp to the secods
parameter of the date/time function. I seem to recall someone saying this
would do the trick... Set the minutes, hours ect. to 0.



On Fri, Feb 3, 2012 at 1:42 AM, Ron <ron at ...1740...> wrote:

> Just google for gambas calculate get unix time
>
> Regards,
> Ron_2nd.
> > Hi "another Rolf"
> >
> >>> is there a function which allows to convert an unix timestamp into the
> >>> appropriated date/time in Gambas3?
> >>>
> >>> If, how is it called and how to use.
> >> Take a look at this one:
> >> http://gambasdoc.org/help/lang/stat?v3
> >> file.stat should deliver a file date. Or did I get you wrong?
> > For my problem, you get wrong. The unix timestamp is not only the time
> > of a file. It is the time in seconds since the 1. Jan. 1970. Even the
> > system clock only counts the seconds.
> >
> > My problem is, that a network application send a timestamp as a string.
> > I have to convert this string into Date and Time - which is usually done
> > in C or PHP or... by a function of a system library (which of course
> > know leap years).
> >
> > And some times I would like to generate a timestamp as well, for example
> > to send it to a database.
> >
> > Another helper out there?
> >
> > 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 at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
> ------------------------------------------------------------------------------
> 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 at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
If you ask me if it can be done. The answer is YES, it can always be done.
The correct questions however are... What will it cost, and how long will
it take?



More information about the User mailing list