Change Time Format In Excel From Exported Data

JEF13

New Member
Joined
Jun 30, 2018
Messages
49
Office Version
  1. 2019
When exporting a data set into Excel the time appears as:

2023-02-23T19:34:58-05:00
2023-02-24T19:58:42-05:00
2023-02-25T20:44:14-05:00
2023-02-26T20:08:51-05:00
2023-02-27T19:54:45-05:00

When I attempt to format using hh:mm AM/PM nothing happens.

How can I convert the above to hh:mm format for all cells?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
When exporting a data set into Excel the time appears as:
When you move data into excel, that's usually refered to as importing. While moving data out of excel is exporting. Can I assume you mean importing?

When I attempt to format using hh:mm AM/PM nothing happens
Excel can, to a limited extent figure, out when string data imported from say, a CSV file is a date or a time and automatically do the conversion, but this:
Book1
A
12023-02-23T19:34:58-05:00
22023-02-24T19:58:42-05:00
32023-02-25T20:44:14-05:00
42023-02-26T20:08:51-05:00
52023-02-27T19:54:45-05:00
Sheet1

is non-standard. You will need to convert it before import, or convert it after import using a formula
Book1
AB
12023-02-23T19:34:58-05:0002-23-23 07:34 PM
22023-02-24T19:58:42-05:0002-24-23 07:58 PM
32023-02-25T20:44:14-05:0002-25-23 08:44 PM
42023-02-26T20:08:51-05:0002-26-23 08:08 PM
52023-02-27T19:54:45-05:0002-27-23 07:54 PM
Sheet1
Cell Formulas
RangeFormula
B1:B5B1=DATEVALUE(LEFT(A1,10))+TIMEVALUE(MID(A1,12,8))

(I'm ignoring "-05:00" since you have not explained it).
 
Upvote 0
what are you exporting from???

I have seen this from systems where it uses the UTC (GMT) time and then adds or subtracts the hour difference for its location , often used in global call handling systems
so the one database is feed from systems all over the world and so have to take into account any time differences

UTC
Coordinated Universal Time or Universal Time Coordinated
used to be GMT timezone London

-5 - is that US - EST Eastern Standard time - on East side of USA
 
Upvote 0
Thanks everyone for yoru reply. To clariy, I have no control over the data that is being saved into a .csv or excel file as it's coming from another site. I'm looking for a formula that I can copy and paste for thousands of cells. The goal is to take 2023-02-23T19:34:58-5:00 and have it show:

2023 02 23 19:34 which is for February 23, 2023 at 7:34 PM.

Thanks.

Jeffrey
 
Upvote 0
Maybe the below. Format the cells as yyyy mm dd hh:mm
Book1.xlsb
AB
22023-02-23T19:34:58-5:002023 02 23 19:34
Sheet2
Cell Formulas
RangeFormula
B2B2=--SUBSTITUTE(LEFT(A2,19),"T"," ")
 
Upvote 0
The goal is to take 2023-02-23T19:34:58-5:00 and have it show: 2023 02 23 19:34 which is for February 23, 2023 at 7:34 PM.

Doesn't the formula I posted above already do that?
Book1
AB
12023-02-23T19:34:58-05:00 February 23, 2023 07:34 PM
Sheet3
Cell Formulas
RangeFormula
B1B1=DATEVALUE(LEFT(A1,10))+TIMEVALUE(MID(A1,12,8))
 
Upvote 0
are you using that time to then workout any stats - as i mentioned just beware , that is not the real time of the event , as mentioned the -5 gives the time difference
i used that in the 90's for all sorts of global stats and performance issue on a central database / warehouse
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,459
Members
452,915
Latest member
hannnahheileen

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