| | |
Facing problem with creating different timezone on a vb form
![]() |
•
•
Join Date: Nov 2007
Posts: 3
Reputation:
Solved Threads: 0
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.
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.
If you know the base time then based on the current time you can use something like this:
Assuming EST as the base time
CST = DateAdd("h", -1, Now)
MST = DateAdd("h", -2, Now)
PST = DateAdd("h", -3, Now)
So on..
Assuming EST as the base time
CST = DateAdd("h", -1, Now)
MST = DateAdd("h", -2, Now)
PST = DateAdd("h", -3, Now)
So on..
•
•
Join Date: Nov 2007
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
If you know the base time then based on the current time you can use something like this:
Assuming EST as the base time
CST = DateAdd("h", -1, Now)
MST = DateAdd("h", -2, Now)
PST = DateAdd("h", -3, Now)
So on..
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
Last edited by mohammadhaneef; Nov 5th, 2007 at 5:26 pm.
•
•
Join Date: Nov 2007
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
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
Please see if you can help,
If the Base time is 18:00:00 then the form time should be 06:30:00.
Thanks again
![]() |
Similar Threads
- How to get value of selected dynamic checkboxes? (ASP.NET)
- Validation control (ASP.NET)
- VB .Net Enterprise Edition (VB.NET)
- Facing the problem on "RedirectFromLoginPage" (VB.NET)
- problem in sending mail form web application (ASP.NET)
- HTML question about creating a certificate form? (HTML and CSS)
- help with creating form counter (PHP)
- Problem with OPENXML in UDF (MS SQL)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: How to using a variable in a database connection
- Next Thread: Visual basic 6 picture background problem
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





