Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Changing text to date format

Hi

Using Excel 2003.

I have a long list of dates in the format 14.6.61. These are currently
aligned to the left and are considered to be text. Changing the format
to date doesn't appear to make any changes. The column begins at D1
with the word 'DOB'.

How can change these data to date format?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Changing text to date format

Select that column
Data|Text to columns
fixed width (but remove any lines that excel guessed)
Tell excel that the field is a date in dmy order

And finish up.

CM wrote:

Hi

Using Excel 2003.

I have a long list of dates in the format 14.6.61. These are currently
aligned to the left and are considered to be text. Changing the format
to date doesn't appear to make any changes. The column begins at D1
with the word 'DOB'.

How can change these data to date format?

Thanks


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Changing text to date format

This datte is a vvery hard date to convert becaue the number of characters
are not fixed at two characters for each filed (day, month, year). to use an
excel fformula is nearly impossible becasue it is so complex. Instead use a
VBA function. the one below works. You have tto format the cell on the
Excel spreadsheet as a Date (any date format you like), otherwise you get a
number that doesn't make any sense.

Function Convertdate(Stringdate As String) As Date

MyStringdate = Stringdate
FirstPeriod = InStr(MyStringdate, ".")
Myday = Left(MyStringdate, FirstPeriod - 1)
MyStringdate = Mid(MyStringdate, FirstPeriod + 1)
SecondPeriod = InStr(MyStringdate, ".")
MyMonth = Left(MyStringdate, SecondPeriod - 1)
MyYear = Mid(MyStringdate, SecondPeriod + 1)

Stringdate = MyMonth + "/" + Myday + "/" + MyYear

Convertdate = CDate(Stringdate)
End Function


"CM" wrote:

Hi

Using Excel 2003.

I have a long list of dates in the format 14.6.61. These are currently
aligned to the left and are considered to be text. Changing the format
to date doesn't appear to make any changes. The column begins at D1
with the word 'DOB'.

How can change these data to date format?

Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing text to date format mcamp Excel Worksheet Functions 8 February 8th 07 08:51 PM
Changing Date Format Chris Excel Discussion (Misc queries) 3 January 25th 07 04:47 PM
changing date format SITCFanTN New Users to Excel 4 June 5th 06 05:26 AM
Changing Date Format stittal Excel Worksheet Functions 5 October 24th 05 07:49 PM
How to format date as text without changing appearance? [email protected] Excel Discussion (Misc queries) 4 May 18th 05 09:25 AM


All times are GMT +1. The time now is 05:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"