View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
Shane Devenshire Shane Devenshire is offline
external usenet poster
 
Posts: 857
Default Date Formatting/adding slashes

Hi Teresa,

You can simplify the suggested approaches

=DATE(VALUE(RIGHT(A2,4)), VALUE(LEFT(A2,1)), VALUE(MID(A2,2,2)))

to the following:

=DATE(RIGHT(A1,4), LEFT(A1),MID(A1,2,2))

However, keep in mind that all these approaches have a problem - what does
this represent: 1112009 is this 11/1/2009 or 1/11/2009?

To make these approaches better is is preferable that the original dates are
entered 02012007 which would be 2/1/2007. If the dates are entered this way
you should modify the above formula to read:

=DATE(RIGHT(A1,4), LEFT(A1,2),MID(A1,2,2))

Cheers,
Shane Devenshire
Microsoft Excel MVP

"teresa" wrote in message
...
Hello,

I have a spreadsheet with data from a datebase that list dates with no
slashes. How can I add slashes?

Current format -7132007
Desired format- 7/13/2007

Thanks