text to date

johngio

Board Regular
Joined
Jan 28, 2005
Messages
174
HI all,

I have some values such as:

Wed-11-Oct 06:29
Thu-12-Oct 11:37

These are manually entered as text. I would like to have excel recognise them as dates and times separately, as I have a column with dates such as 11/10/2006 (and I want to look for this date to see if they are the same). However I am having trouble converting this text into a date format (I have managed to create a separate column with the time component).

Any ideas?

Thanks

John
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I can create a date by using the following code:
(in cell AB10)
=MID(AB14,5,2)&MID(AE$11,1,1)&MID(AB14,8,3)&MID(AE$11,1,1)&2006

This will give me: 11-Oct-2006

However, when I try DATEVALUE("AB10") I get a #VALUE! error. Must be one of those formatting things in Excel.

Any tips?

Thanks
 
Upvote 0
You are on the right track, but you need to convert "Oct" to the numeric equivalent of 10 to get DateValue to work.
 
Upvote 0
Hmmm,

Even If I change the formula to :

=MID(AB14,5,2)&MID(AE$11,1,1)&10MID(AE$11,1,1)&2006

and try DATEVALUE("AB10") I get the #VALUE! error . . .

Are there any easy ways to convert Jan/Feb/Mar (as text) to 1,2,3, etc?

Cheers
 
Upvote 0
However, when I try DATEVALUE("AB10") I get a #VALUE! error. Must be one of those formatting things in Excel.
You are on the exact track, just drop the " " quote marks...

DATEVALUE(AB10) should work fine (then format the cell with a date format).

.
 
Upvote 0
Interesting, it works for:
11-Oct-2006
but not for
Oct-11-2006

I thought it might have to be reversed to work here in the US, but apparently not...
 
Upvote 0

Forum statistics

Threads
1,214,559
Messages
6,120,208
Members
448,951
Latest member
jennlynn

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