#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 112
Default Date Formats

I have a report that the date was sent as 20070301 instead of 3/1/2007. If I
use the format cell and change to date it doesn't work. Does anyone know of
a formula that will modify the 20070301?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Date Formats

One way: =MID(F7,5,2)&"/"&RIGHT(F7,2)&"/"&LEFT(F7,4)

Adjust cell reference to suit.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Denise" wrote:

I have a report that the date was sent as 20070301 instead of 3/1/2007. If I
use the format cell and change to date it doesn't work. Does anyone know of
a formula that will modify the 20070301?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Date Formats

If you need to do calculations off the parsed text string, use this:
=DATEVALUE(MID(F7,5,2)&"/"&RIGHT(F7,2)&"/"&LEFT(F7,4))

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Dave F" wrote:

One way: =MID(F7,5,2)&"/"&RIGHT(F7,2)&"/"&LEFT(F7,4)

Adjust cell reference to suit.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Denise" wrote:

I have a report that the date was sent as 20070301 instead of 3/1/2007. If I
use the format cell and change to date it doesn't work. Does anyone know of
a formula that will modify the 20070301?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Date Formats

If they are always 8 digits in that format, select the whole range
do datatext to columns, click next twice, in step 3 under column data
format select date, then from the dropdown select YMD and click finish
No need for formulas

--
Regards,

Peo Sjoblom


"Denise" wrote in message
...
I have a report that the date was sent as 20070301 instead of 3/1/2007. If
I
use the format cell and change to date it doesn't work. Does anyone know
of
a formula that will modify the 20070301?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Date Formats

On Wed, 4 Apr 2007 11:12:02 -0700, Denise
wrote:

I have a report that the date was sent as 20070301 instead of 3/1/2007. If I
use the format cell and change to date it doesn't work. Does anyone know of
a formula that will modify the 20070301?


Assuming your 3/1/2007 is MDY format (and not DMY), then:

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

will convert this to a date.

Format the cell as "m/d/y"


--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
Date Formats Amy Excel Discussion (Misc queries) 2 January 23rd 07 05:05 AM
date formats Matt Excel Discussion (Misc queries) 2 May 17th 06 07:52 AM
Date Formats Bernard Liengme Excel Discussion (Misc queries) 1 July 3rd 05 05:37 PM
Date formats JR Excel Discussion (Misc queries) 1 June 1st 05 12:04 AM
Date formats Penco Excel User Excel Discussion (Misc queries) 1 November 28th 04 09:11 AM


All times are GMT +1. The time now is 02:33 PM.

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"