Formatting date cells that are stored as a number

sobeitjedi

Board Regular
Joined
Mar 13, 2006
Messages
235
Office Version
  1. 365
I have a range of numbers in a column that are stored as a number:

StartDate
20120103090000
20120104000000
20120104000000
20120104100000
20120104140000
20120104150000
20120104153000
20120105000000
20120105000000
20120105101500
20120105130000
20120105130000
20120105130000
20120105140000
20120105140000
20120105140000
20120105140000
20120105150000
20120105150000
20120106000000
20120106110000

How do I format this so it's in a date/time format?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
It would be easier if you translated what they meant rather than us having to guess.
 
Upvote 0
Sorry, thought it was clear

20120103090000 = 2012(year)01(month)03(day)09(hour)00(Minute)00
 
Upvote 0
Hi


Cells A2 = 20120103090000

Custom Excel number format
0000\/00\/00 00\:00\:00

formulas B2 =--TEXT(LEFT(A2,8),""0000\/00\/00"")
Date number format


formulas C2 =--TEXT(--RIGHT(A2,6),"00\:00\:00")
Hour number format
 
Upvote 0
Done that, but when I put the formula in B2, I get an error "There's a problem with this formula" etc (for the date formula - the time one seems to work)

The bit of the formula that'#s highlighted is: ""0000\
 
Last edited:
Upvote 0
Hi

Different version

formulas B2 =--TEXT(LEFT(A2,8),"0000\/00\/00")
Date number format
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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