Formula to Convert Date and Time to PDT and round down on the milliseconds

tbruce

Board Regular
Joined
Dec 9, 2013
Messages
77
Office Version
  1. 365
Platform
  1. Windows
Hoping someone could help here. I'm trying to create a formula to convert this date and time stamp that is in UTC (zulu time) and convert it to PDT (-7)/24) and round it DOWN from the last three digits (milliseconds) if .499 or lower, and round UP if .500 and greater and get rid of the Z and then the milliseconds and show to the seconds (rounded down/up). The rounding down/up and getting rid of the Z is what I'm struggling with. I've tried several variations and nothing seems to work. When I remove the Z's I lose the milliseconds, and I need that to round down/up. It seems to Round Up automatically when I get rid of the Z with a CTRL+H and replace the Z with nothing. Any help would be much appreciated.

A​
B​
12019-09-04 02:16:07.135Z
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Could you post a few examples with expected results?
Do you have text or numeric data?
What format do you want for the result?
Please post an extract of your sheet with the forum's tool named XL2BB.

One quick idea is shown below

Dates Time.xlsb
AB
1
22019-09-04 02:16:07.135Z2019:09:04 2:16:07
32019-09-04 02:16:07.500Z2019:09:04 2:16:08
4
5b
Cell Formulas
RangeFormula
B2:B3B2=MROUND(--LEFT(A2,23),"0:00:01")
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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