[fxruby-users] to get the system date / time?
dave L
dglnz at yahoo.com
Wed Aug 26 18:13:14 EDT 2009
Len,
Many thanks,
two two others sent me similar pointers and i had taken it for granted that FXruby might have had it's own datetime handling routines - Doh light has since switched on
Dave.
--- On Wed, 26/8/09, Len Lawrence <lcl at tarazed.demon.co.uk> wrote:
> From: Len Lawrence <lcl at tarazed.demon.co.uk>
> Subject: Re: [fxruby-users] to get the system date / time?
> To: fxruby-users at rubyforge.org
> Received: Wednesday, 26 August, 2009, 12:33 AM
> dave L wrote:
> > I would like to be able to get the PC system date/time
> as you can in ruby.
> >
> > not exactly sure why i'm not getting it currently!
> >
> > I'm doing this at the moment.
> >
> > mydate = Date
> > mytime = Time
> >
> > these failed so added a .now and it still failed!!!
> >
> > looked at the fxruby Rdoc site and found no luck their
> as yet (and
> > googled)!
> >
> > dave.
> >
> >
> > Email slow, clunky, unreliable? Switch to Yahoo!Xtra
> Mail
> > <http://au.rd.yahoo.com/nz/mail/tagline/2009/mailsignup/*http://yahoo.co.nz/mail>,
>
> > New Zealand's new email address.
> >
> >
> ------------------------------------------------------------------------
> Have you got
>
> require 'date'
>
> in your header section?
>
> I have this in one of my non FX scripts:
>
> Today = (DateTime.now).to_s.slice( 0, 10 ).tr( '-', ' ' )
>
> to get the year, month and day.
>
> Len
>
>
>
> _______________________________________________
> fxruby-users mailing list
> fxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/fxruby-users
>
More information about the fxruby-users
mailing list