Re: How to resolve timestamp?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Read inline,
In news:EADF9170-EB7D-4451-A173-48A0B0B7DD77@xxxxxxxxxxxxx,
Wayne Gore <WayneGore@xxxxxxxxxxxxxxxxxxxxxxxxx> typed:
Thanks Herb.
Finally an answer to this mystery!

I'm not Herb, he thought it was seconds.
But I'm glad I could help, only because I had to answer the question once
before, up until then I never gave it much thought.


Creating the timestamp with VBScript for instance is rather easy:

Timestamp = (Year(Now) - 1601) * 365 * 24 + (98 * 24) + (Day(Now) -
1) * 24 + Hour(Now)

The reverse on the other hand is way much more difficult when it
comes to the months.

Do you know of any algorithm that solves this?

I don't get your question about months, it is all about days, keeping in
mind you have to add the Leap Days in Leap Years. Since you are trying to
make a script out of this, your script (as written) will have to add the
Leap days. There is no real constant I can think of because of the Leap
days. Maybe a script that will add the leap day to this script during Leap
years and Leap Centuries.

--
Best regards,
Kevin D. Goodknecht Sr. [MVP]
Hope This Helps
Send IM: http://www.icq.com/people/webmsg.php?to=296095728
===================================
When responding to posts, please "Reply to Group"
via your newsreader so that others may learn and
benefit from your issue, to respond directly to
me remove the nospam. from my email address.
===================================
http://www.lonestaramerica.com/
http://support.wftx.us/
http://message.wftx.us/
===================================
Use Outlook Express?... Get OE_Quotefix:
It will strip signature out and more
http://home.in.tum.de/~jain/software/oe-quotefix/
===================================
Keep a back up of your OE settings and folders
with OEBackup:
http://www.oehelp.com/OEBackup/Default.aspx
===================================


.



Relevant Pages

  • Re: Need cron formula
    ... many days in the current month, leap years, etc. I've read that there ... Tell cron to execute a script at 3:00 am every day. ... it is the 25th day it executes the command, ...
    (comp.unix.programmer)
  • Re: Scheduling Jobs - Last day of the month - HOWTO?
    ... any obvious mechanism for specifying the *last day* of the month. ... Unfortunately, my environment is Cygwin, and the job to be launched ... current year is a leap year: ... The script is run on the 28th and 29th of each February (by the ...
    (comp.os.linux.misc)
  • Re: Problem with count-up script
    ... > still has a problem calculating the number of months. ... Sorry, sorry, sorry if it's your script. ... exactly true. ... The common formula for leap year (accounting also the ...
    (comp.lang.javascript)
  • Re: Need cron formula
    ... many days in the current month, leap years, etc. I've read that there ... is no way that cron can do this by itself but must run an external ... script, perhaps once each day. ... The system crashes in the brief interval between starting the at ...
    (comp.unix.programmer)