re-arrange a cell that contains date/time

STEMALO

Board Regular
Joined
Apr 15, 2008
Messages
93
Hi everyone,

current cell is:
5/6/2014 7:57:24 PM

would like it to be:
2014/06/05 19:57:24

is this possible?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hi,

Assuming 5/6/2014 is May 6th, 2014

Just reformat the cell as yyyy/dd/mm hh:mm:ss
 
Upvote 0
Then the value in your subject cell is TEXT, not real Date/Time values.

Assuming data in A1, in an unused cell, put =ISNUMBER(A1)
What do you get?
 
Upvote 0
false

the cell is currently formatted as GENERAL.
Tried to reformat it but doesn't work.
Even tried splitting it..
 
Upvote 0
Again, assuming your sample is May 6th, and not knowing what Other dates you may have, this should do the job:


Book1
ABC
15/6/2014 7:57:24 PM2014/05/06 19:57:24
2Custom Format C1
3yyyy/dd/mm hh:mm:ss
Sheet290
Cell Formulas
RangeFormula
C1=(MID(A1,FIND("|",SUBSTITUTE(A1,"/","|",2))+1,4)&"/"&SUBSTITUTE(MID(A1,3,2),"/","")&"/"&SUBSTITUTE(LEFT(A1,2),"/","")&MID(A1,FIND(" ",A1),15))+0
 
Upvote 0
Oops, I had the day and month backwards, corrected formula below:


Book1
ABC
15/6/2014 7:57:24 PM2014/06/05 19:57:24
2Custom Format C1
3yyyy/dd/mm hh:mm:ss
Sheet290
Cell Formulas
RangeFormula
C1=(MID(A1,FIND("|",SUBSTITUTE(A1,"/","|",2))+1,4)&"/"&SUBSTITUTE(LEFT(A1,2),"/","")&"/"&SUBSTITUTE(MID(A1,3,2),"/","")&MID(A1,FIND(" ",A1),15))+0
 
Upvote 0
i can't thank you enough...it works perfectly..
Now going to open a beer and reverse engineer your formula.

Again thanks
 
Upvote 0
You're welcome, glad it worked for you.

Cheers :beerchug:
 
Upvote 0
I must apologize STEMALO, there are times when I overthink the problem and solution, and not have had a good night sleep last night and my mind being a little "cloudy", this is definitely one of those times.

The solution can simply be:


Book1
ABC
15/6/2014 7:57:24 PM2014/06/05 19:57:24
2Custom Format C1
3yyyy/dd/mm hh:mm:ss
Sheet290
Cell Formulas
RangeFormula
C1=A1+0
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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