From: Lee P. <le...@sa...> - 2007-09-24 15:57:15
|
I missed the part where you said "conversion target". All is well! Lee Rick McGuire wrote: > I'm note sure I understand what you mean by "formatting". If just used > alone like that, you get a value for the current time, which will > contain information about both the date and time. > > Here's a small example of what I mean. > > say date('f') time('f') -- displays the same values > > say date('f) date('f', date('s'), 's') time('f', time('n'), 'n') > > The second line will display something like "63326228067890000 > 633261888800000000 39267890000", depending on when you run it. > > The sum of the second and third values should add up to the first > value. That is, > > day('f', date('s'), 's') > > returns the timestamp value for 24 Sep 2007 at 00:00:00.000000 and > time('f', time('l), 'l') returns a value for whatever time you happen to > run this on 1 January 0001. > > You can verify this, with > > say date('N', 39267890000, 'f') time('L', 39267890000, 'f') > > which displays > > 1 Jan 0001 10:54:27.890000 > > The converted Date number fed into the above will display > > 24 Sep 2007 00:00:00.000000 > > and the one for current timestamp will display > > 24 Sep 2007 10:54:27.890000 > > > Rick > > On 9/24/07, * Lee Peedin* <le...@sa... > <mailto:le...@sa...>> wrote: > > Rick, > I was just experimenting with this. Your note below would seem in > indicate that the returned values > will be formated; however, I am not seeing that. > > -------------------- > Code > say 'Current Date/Time Is..:' date('s') time('n') > say > say 'TimeT Returned...:' time('t') > say > say 'TimeF Returned...:' time('f') > say > say 'DateT Returned...:' date('t') > say > say 'DateF Returned...:' date('f') > -------------------- > Says > Current Date/Time Is..: 20070924 10:21:08 > > TimeT Returned...: 1190629268 > > TimeF Returned...: 63326226068609000 > > DateT Returned...: 1190629268 > > DateF Returned...: 63326226068609000 > -------------------- > > Lee > > > Rick McGuire wrote: > > For those of you that don't subscribed to the tracker/svn mailing > list, > > over the weekend I checked in changes to add new 'F'ull and 'T'icks > > options to Date() and Time(). The Full option will return the > number of > > microseconds since 1 January 0001 00:00: 00.000000. The Ticks > option > > returns the number of seconds since 1 January 1970 00:00: 00.000000. > > > > When used as a conversion target for Date(), the time portion will be > > 00:00:00.000000 for returned conversions. When used as a conversion > > target for Time(), the date portion will be for the base date of the > > particiular option (either 1 January 0001 or 1 January 1970). The > > returned values for these options can be used to easily implement > > date/time arithmetic. > > > > Rick > > > > > > > ------------------------------------------------------------------------ > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2005. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Oorexx-devel mailing list > > Oor...@li... > <mailto:Oor...@li...> > > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > <https://lists.sourceforge.net/lists/listinfo/oorexx-devel> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Oorexx-devel mailing list > Oor...@li... > <mailto:Oor...@li...> > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Oorexx-devel mailing list > Oor...@li... > https://lists.sourceforge.net/lists/listinfo/oorexx-devel |