Re: How to resolve timestamp?



Thanks Kevin (sorry for the mistake earlier)

What I want to achieve is to resolve a timestamp from its pathetic format (I
mean come on! Starting at the 1601?!? What is the chance of having a DNS
record dating back 400 years?!?) into something that actually makes some
sense to a human being.

If I do not resolve the months then in June I will resolve the timestamp to:
2007 162days 6.00 for instance.
What I could do is to subtract todays timestamp with the DNS records
timestamp and that should only give DNS records age.

But it would be helpful to have a proper date format such as day, month,
year, time (15 of June 2007, 6.00AM) as well as a creation date.

This is why I am interested in some kind of script or algorithm which can
give me the month as well as the year, date and time.

Regards
Wayne

"Kevin D. Goodknecht Sr. [MVP]" wrote:

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

  • Windows Scripting - Timestamp, files, need help. :)
    ... I need to write a script in vbscript (I want to use ... Gets the Highest (most recent timestamp) and compares it to the current ... and formatting it YYYYMMDDHHMM ... formatting each item in the array into the format YYYYMMDDHHMM ...
    (microsoft.public.scripting.vbscript)
  • Re: Maintaining data integrity with multiple users
    ... The way I work this problem is by using a timestamp field in the DB showing ... The first field is a record lock timestamp and the ... point the script will verify the record lock timestamp. ... to see if it is stale by comparing it to the current system time. ...
    (comp.lang.php)
  • Re: Need help for comparing file types from test and prodcution database
    ... > production database but I need to differentiate them with the timestamp ... > 5)Shell script will validate all parameters and then copy all ... > 6)files in txt file from source to destination ...
    (comp.unix.shell)
  • Re: Unix file timestamp issue ..
    ... the latest timestamp on everyrun. ... There is some unknown process which is acting on this and changing the ... ls -lc filename should show when the timestamp was changed. ... file by creating a customized shell script through which you may use ...
    (comp.unix.shell)
  • Re: How to easily append a timestamp to tar archive name ?
    ... However I would like to automatically append a timestamp whenever I call this command ... Does Gnu-tar offer such an automatic timestamp appending? ... It *should* also work when called from a perl script, ...
    (comp.lang.perl.misc)

Quantcast