Facing problem with creating different timezone on a vb form
Expand Post »
Please note this is in Visual Basic 6.0 language not .net :
I am facing alot of probem while creating a program which can show 5 different timezone of US on a form on 5 different label in connection with the system time.
for Eg
label1.caption "should be IST" Indian stan time
label2.caption "should be GMT" Green wich mean time
label3.caption "should be PST" Pacific Time
label4.caption "should be MST" Mountain Time
label5.caption "should be EST" Eastern time
This should work in connection with the system time, for eg: if its 18:00 hrs system time here, then EST ie: Label3.caption should be 08:00 hrs. 6 hours before our time.
Any help would really be appreciated.
Last edited by mohammadhaneef; Nov 5th, 2007 at 4:36 pm.
Base time would be the system time
and label should display the time 6 HOURS before the system time and so on.
system time 18:20:20 the Label time should be
12:20:20 hrs.
Based on reply would this code fetch me the Date or Time or Both. Please reply in detail
Thanks buddy the code worked as told be you but there is a slight problem with the minutes as that remains the same (The hour time increases or decreases but the minutes dont change) unfortunate enough I tried other alterations but it wont accept.
Please see if you can help,
If the Base time is 18:00:00 then the form time should be 06:30:00.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.