Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text to date formula 1

Status
Not open for further replies.

Mizzness

Programmer
May 2, 2003
174
US
All.

I am using the following formula to change my date (in text form) to a number:

=DATEVALUE(LEFT(L170,4)&"/11/"&RIGHT(L170,2))

How can I change the middle section, which is the month ?
Note: Left = the year / Right = the day

I have tried the MID function but to no avail.

Thanx.
 




Hi,
[tt]
=DATE(LEFT(L170,4),mid(L170,5,2),RIGHT(L170,2))

[/tt]
or try using the Data > text to columns... feature. Select FIXED, no separaters and choose the date format that is appropriate.

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Skip,

I was trying that formula with DATEVALUE but DATE did the trick.


Thanx !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top