Format to Decrease "hour" to accomdate Central Tim

dvhornor

New Member
Joined
Jul 5, 2003
Messages
7
I am located in the Central time zone. One of our servers is located in the Eastern time zone. We receive exports with their time on it. I need help to take the hour portion of their time and decrease it by one hour - to reflect the Central time.

Dim MyTime
Dim TimeChangePlus1

MyTime = Format(Right(sInput, Len(sInput) - iLstPos), "hh:mm AMPM")
TimeChangePlus1 = Format("1:00", "hh:mm")
MyTime = MyTime - TimeChangePlus1
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Re: Format to Decrease "hour" to accomdate Central

In a query, this calculation will reduce the time by 1 hour:

CentralTime: [MyTable]![EasternTime]-(1/24)
 
Upvote 0
Re: Format to Decrease "hour" to accomdate Central

Thank you. This worked. This will save many hours of trying to figure it out.
 
Upvote 0

Forum statistics

Threads
1,221,604
Messages
6,160,747
Members
451,670
Latest member
Peaches000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top