Re: Querying Current Time
- Posted by Brian Jackson <bjackson at 2FARGON.HYPERMART.NET> Mar 31, 1999
- 481 views
On Wed, 31 Mar 1999 14:32:40 PST, Phillip Croft <tarl_cabot00 at HOTMAIL.COM> wrote: >How do I query the computer for the current time, and store it in a >variable? I just need to know the query function. >-Phil >Get Your Private, Free Email at http://www.hotmail.com I shamelessly pilfered this from library.doc ;-] Syntax: s = date() Description: Return a sequence with the following information: { year, -- since 1900 month, -- January = 1 day, -- day of month, starting at 1 hour, -- 0 to 23 minute, -- 0 to 59 second, -- 0 to 59 day of the week, -- Sunday = 1 day of the year} -- January 1st = 1 Example: sequence now now = date() -- now has: {95,3,24,23,47,38,6,83} -- i.e. Friday March 24, 1995 at 11:47:38pm, day 83 of the year Comments: The value returned for the year is actually the number of years since 1900 (not the last 2 digits of the year). In the year 2000 this value will be 100. In 2001 it will be 101, etc. See Also: time to get just the time, you could then say: sequence hhmmss hhmmss = now[4] & now[5] & now[6]