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

I have an excel file that contains text cells which need to be formatted to
dates some are single digit months and some are double digit (3042006
11051999 1012001) etc. I need to figure out how to convert these dates into
a standard date format. I am importing them into my computer system which is
seeing them as julian dates the way they are being imported now. I need them
to be mm/dd/yy or mm/dd/yyyy format.
--
mcamp
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default changing text to date format

=DATE(RIGHT(A1,4),LEFT(A1,LEN(A1)-6),LEFT(RIGHT(A1,6),2))

--
Gary's Student
gsnu200704


"mcamp" wrote:

I have an excel file that contains text cells which need to be formatted to
dates some are single digit months and some are double digit (3042006
11051999 1012001) etc. I need to figure out how to convert these dates into
a standard date format. I am importing them into my computer system which is
seeing them as julian dates the way they are being imported now. I need them
to be mm/dd/yy or mm/dd/yyyy format.
--
mcamp

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default changing text to date format

That worked like a charm! I don't understand a word of it but thanks a ton!
--
mcamp


"Gary''s Student" wrote:

=DATE(RIGHT(A1,4),LEFT(A1,LEN(A1)-6),LEFT(RIGHT(A1,6),2))

--
Gary's Student
gsnu200704


"mcamp" wrote:

I have an excel file that contains text cells which need to be formatted to
dates some are single digit months and some are double digit (3042006
11051999 1012001) etc. I need to figure out how to convert these dates into
a standard date format. I am importing them into my computer system which is
seeing them as julian dates the way they are being imported now. I need them
to be mm/dd/yy or mm/dd/yyyy format.
--
mcamp

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default changing text to date format

If you don't understand, then I suggest that you look up those functions in
Excel's built-in help, or on the web at
http://office.microsoft.com/en-us/ex...042111033.aspx
--
David Biddulph

"mcamp" wrote in message
...
That worked like a charm! I don't understand a word of it but thanks a
ton!


"Gary''s Student" wrote:

=DATE(RIGHT(A1,4),LEFT(A1,LEN(A1)-6),LEFT(RIGHT(A1,6),2))


"mcamp" wrote:

I have an excel file that contains text cells which need to be
formatted to
dates some are single digit months and some are double digit (3042006
11051999 1012001) etc. I need to figure out how to convert these dates
into
a standard date format. I am importing them into my computer system
which is
seeing them as julian dates the way they are being imported now. I
need them
to be mm/dd/yy or mm/dd/yyyy format.
--
mcamp



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default changing text to date format

On Wed, 7 Feb 2007 08:19:01 -0800, mcamp
wrote:

I have an excel file that contains text cells which need to be formatted to
dates some are single digit months and some are double digit (3042006
11051999 1012001) etc. I need to figure out how to convert these dates into
a standard date format. I am importing them into my computer system which is
seeing them as julian dates the way they are being imported now. I need them
to be mm/dd/yy or mm/dd/yyyy format.



=--TEXT(A1,"00\/00\/0000")

Format the result as you wish:

Format/Cells/Number/Date and select


--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default changing text to date format

Doesn't that screw up with single digit months, Ron? Try it on the OP's
first example, 3042006, or his 3rd example, 1012001.
--
David Biddulph

"Ron Rosenfeld" wrote in message
...

=--TEXT(A1,"00\/00\/0000")

Format the result as you wish:

Format/Cells/Number/Date and select


On Wed, 7 Feb 2007 08:19:01 -0800, mcamp
wrote:

I have an excel file that contains text cells which need to be formatted
to
dates some are single digit months and some are double digit (3042006
11051999 1012001) etc. I need to figure out how to convert these dates
into
a standard date format. I am importing them into my computer system which
is
seeing them as julian dates the way they are being imported now. I need
them
to be mm/dd/yy or mm/dd/yyyy format.



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default changing text to date format

On Thu, 8 Feb 2007 13:46:25 -0000, "David Biddulph"
wrote:

Doesn't that screw up with single digit months, Ron? Try it on the OP's
first example, 3042006, or his 3rd example, 1012001.


Probably because I'm in the US and not UK, David, I took it that the OP's data
format was mddyyyy or mmddyyyy.

You need to look at his SECOND example: 11051999


--ron
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default changing text to date format

Yes, it was unfortunate that all the examples from the OP could be
interpreted either way. If his second example had been 11251999 or
25111999, then we'd all have known what language we were speaking.

I suppose that the fact he said he wanted his output formatted as mm/dd/yy
or mm/dd/yyyy format should have been a hint to me if I'd been wider awake.
It's an interesting reminder that these things need to be clearly specified,
and often need the Windows Regional Options set accordingly. As it was,
your formula and the one from Gary's Student gave totally different answers
on my machine.
--
David Biddulph

"Ron Rosenfeld" wrote in message
...

Probably because I'm in the US and not UK, David, I took it that the OP's
data
format was mddyyyy or mmddyyyy.

You need to look at his SECOND example: 11051999


On Thu, 8 Feb 2007 13:46:25 -0000, "David Biddulph"

wrote:

Doesn't that screw up with single digit months, Ron? Try it on the OP's
first example, 3042006, or his 3rd example, 1012001.



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default changing text to date format

On Thu, 8 Feb 2007 18:00:27 -0000, "David Biddulph"
wrote:

Yes, it was unfortunate that all the examples from the OP could be
interpreted either way. If his second example had been 11251999 or
25111999, then we'd all have known what language we were speaking.

I suppose that the fact he said he wanted his output formatted as mm/dd/yy
or mm/dd/yyyy format should have been a hint to me if I'd been wider awake.
It's an interesting reminder that these things need to be clearly specified,
and often need the Windows Regional Options set accordingly. As it was,
your formula and the one from Gary's Student gave totally different answers
on my machine.



Yes, Gary's formula will give proper results independent of the Windows
Regional Settings. Mine will only give the "correct" answer with US style
Regional Settings.
--ron
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
How to convert text into date format? Eric Excel Discussion (Misc queries) 6 January 24th 07 03:27 PM
The Cell formats keep changing itself from text to date Hervinder Excel Discussion (Misc queries) 2 November 16th 06 03:56 PM
Cell format with Data Import (date appearing as text) Louise Excel Discussion (Misc queries) 3 September 21st 06 01:57 PM
text and date format in a cell Nicawette Excel Discussion (Misc queries) 4 June 28th 06 08:57 AM
CHANGE TEXT TO DATE FORMAT deniseh Excel Discussion (Misc queries) 2 September 15th 05 12:48 PM


All times are GMT +1. The time now is 01:06 AM.

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

About Us

"It's about Microsoft Excel"