date format issue

reellavkastning

New Member
Joined
May 23, 2011
Messages
10
I have this format in one cell stored as text

1/1/2008 12:07:26 PM

The problem is to convert it to something like:

01.01.2008

I need to get rid of the timestamp plus the leading zeros problem with the date format.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
That would have worked but it is

1/13/2008 12:18:00 PM

mm/dd/yyyy format.

That returns the #VALUE! if I use the INT and format method.
 
Upvote 0
It returns the value false.

I have to import it as text, otherwise excel recognizes some of the data as dates but others as text, so I get some 1/1/2008 and some 01.13.2008
...
 
Upvote 0
01.12.08 12:05 12.1.2008
01.12.08 13:38 12.1.2008
01.12.08 13:46 12.1.2008
01.12.08 15:11 12.1.2008
1/13/2008 12:18:00 pm #value!
 
Upvote 0
Try:

=TEXT(MID(A1,FIND("|",SUBSTITUTE(A1,"/","|",2))+1,4)&TEXT(SUBSTITUTE(LEFT(A1,FIND("|",SUBSTITUTE(A1,"/","|",2))-1),"/",""),"0000"),"0000\/00\/00")+0
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

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