• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 493
  • Last Modified:

event log reading

i success to read the event log for windows NT using a visual basic program
but the problem is in the eventlogrecord data type because the time it contains is the gloabal time. how can i get the time in my country?
knowing that due to the day light some times the differ between my local time and GMT is 2 or 3 hours
0
aft
Asked:
aft
  • 6
  • 2
  • 2
  • +3
1 Solution
 
CJ_SCommented:
I assume that there is some sort of connection between both computers.

First grab the time on both the NT machine and your machine (I just distinguish between them). Fetch the times on both machines (GetLocalTime API). Then use the DateDiff function to check how much hours are in between them. Then use the DateAdd function with the difference to get the correct time:

'assume date1 and date2 are both filled
difference = DateDiff("h", date1, date2)
date1 = DateAdd("h", difference, date1)

date1 now contains the correct time.

Just fiddle around with it.

regards,
CJ
0
 
aftAuthor Commented:
no u disuss completly another problem than mine
0
 
aftAuthor Commented:
no u disuss completly another problem than mine
who said about multi computer
the problem is in the time returned when reading the event log of windows NT
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
CJ_SCommented:
Should be the system time when that certain event occured... I guess I do not understand the problem.



Regards,
CJ
0
 
MadYugoslavCommented:
You can use (windows base services) functions:
GetSystemTime and GetLocalTime to determine adjucement for time in event log.
0
 
aftAuthor Commented:
i success to read the event log for windows NT using a visual basic program
but the problem is in the eventlogrecord data type because the time it can retrived contains the gloabal time.
how can i get the time in my country?
knowing that due to the day light some times the differ between my local time and GMT is 2 or 3 hours
0
 
aftAuthor Commented:
how can obtain a complete description of the all events numbers that are in the event viewer
0
 
FlamingSwordCommented:
Problem seems clear enough. Either need VB assistance or a switch/option on the Windows DeskTop. Not my turf. VB shows on screen as #1 discussed topic. Likely get better answer there.
0
 
aftAuthor Commented:
i know i do not want any vb help
i need a documentation about the events id of all events of the windows NT event viewer
0
 
aftAuthor Commented:
i success to read the event log for windows NT using a visual basic program
but the problem is in the eventlogrecord data type because the time it contains which retrived from the event log is the gloabal time (grinitish time).
how can i get the time in my country?
knowing that due to the day light sometimes the differ between my local time and GMT is 2 or 3 hours
0
 
MoondancerCommented:
It's time to clean up this topic area and that means taking care of this question. Your options at this point are:
 
1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.
 
2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
3.  Ask Community Support to help split points between participating experts.  Just comment here with details.
 
4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.
 
PLEASE DO NOT AWARD THE POINTS TO ME.
 
____________________________________________
 
 
 
Hi Experts:
 
In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.
 
Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.
 
Thank you everyone.
 
Moondancer :)
Community Support Moderator @ Experts Exchange
 
P.S.  Engineering has been advised about the error in the comment date/time sort order.
0
 
MoondancerCommented:
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20113404.html
http://www.experts-exchange.com/questions/Q.20117832.html
http://www.experts-exchange.com/questions/Q.20122444.html
http://www.experts-exchange.com/questions/Q.20124456.html
http://www.experts-exchange.com/questions/Q.20140329.html
http://www.experts-exchange.com/questions/Q.20143536.html
http://www.experts-exchange.com/questions/Q.20144408.html
http://www.experts-exchange.com/questions/Q.20146151.html
http://www.experts-exchange.com/questions/Q.20140645.html
http://www.experts-exchange.com/questions/Q.20164994.html
http://www.experts-exchange.com/questions/Q.20170961.html
http://www.experts-exchange.com/questions/Q.20187364.html
http://www.experts-exchange.com/questions/Q.20244704.html
http://www.experts-exchange.com/questions/Q.20244702.html




PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0
 
NetminderCommented:
Admin notified of User neglect. Force-accepted by
Netminder
CS Moderator
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 6
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now