View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default Format for Date if you get number

Assuming date is in A1
Try
=IF(LEN(A1)=5,DATE(2000+RIGHT(A1,2),LEFT(A1,1),MID (A1,2,2)),DATE(2000+RIGHT(A1,2),LEFT(A1,2),MID(A1, 3,2)))

If all dates have only five digits then you can use
DATE(2000+RIGHT(A1,2),LEFT(A1,1),MID(A1,2,2))

"Don" wrote:

I get a file that has a date but it gives it to me as a number like 1/15/2009
would be 11509 in the cell. Is there a way to take that value and format it
to know it is a date either by having another cell help format it? Note that
if the date is like 1/08/09 then the number would be 10809...