Re: How to resolve timestamp?
- From: Wayne Gore <WayneGore@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 17 Jan 2007 23:08:01 -0800
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
===================================
- Follow-Ups:
- Re: How to resolve timestamp?
- From: Kevin D. Goodknecht Sr. [MVP]
- Re: How to resolve timestamp?
- References:
- Re: How to resolve timestamp?
- From: Herb Martin
- Re: How to resolve timestamp?
- From: Kevin D. Goodknecht Sr. [MVP]
- Re: How to resolve timestamp?
- From: Wayne Gore
- Re: How to resolve timestamp?
- From: Kevin D. Goodknecht Sr. [MVP]
- Re: How to resolve timestamp?
- Prev by Date: Re: RPC server is unavaible
- Next by Date: Re: unmanageable DNS
- Previous by thread: Re: How to resolve timestamp?
- Next by thread: Re: How to resolve timestamp?
- Index(es):
Relevant Pages
|