|
-
Nov 19th, 2009, 12:33 PM
#1
Thread Starter
New Member
compare modified timeon two file diff time zones
Hi, I'm trying to compare modified time of two files which are in different time zones. I'm able to get the modified of both the files using GetFile and comparing them using DateDiff but since both the files are in different time zones result in incorrect. Getfile is not getting the time zone of the file.
Is there any way to change the time zone of file1 to the time zone of file2. Here, time zone of file1 can be any timezone of 10 different site we have but i know the time zone of file2. Is there a way to do this with a vb script?
Thanks in advance for the help!
-
Nov 20th, 2009, 01:15 AM
#2
Frenzied Member
Re: compare modified timeon two file diff time zones
Couple of ways. Get the machine time (??? is that correct ???) and compare those or if you know the time zones and the difference between them, add that difference to the one that is lagging behind and then compare your dates.
Good Luck
Option Explicit should not be an Option!
-
Nov 20th, 2009, 02:40 AM
#3
Re: compare modified timeon two file diff time zones
file date times are stored as standard value (GMT), then displayed as local time
see http://vbnet.mvps.org/index.html?cod...ledatetime.htm
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|