Removing / from date

B

bhussey

Example 5/10/06
I perform a custom format of mmddyy and the the cell displays 051006
but the value is 5/10/06. How can I get the value to be 051006?
 
D

Dave Peterson

You really want the value to be 051006?

You could use another cell:

=text(a1,"mmddyy")
(if you want the value to be text)

or

=--text(a1,"mmddyy")
and a custom format of 000000
(if you want the value to be numeric)
 
P

Peo Sjoblom

=--TEXT(A1,"mmddyy")

why would you want that, it would be equal to 8/24/2039 and you can't do any
calculations whatsoever. To excel 51006 would just be any number and not a
date, the whole point using date delimiters is to tell excel it's a date, of
course if you need to export it like that it is entirely another matter,
however you would need a help column and the above formula, then paste
special as values and using a custom format of 000000 or change the formula to


=TEXT(TEXT(A1,"mmddyy"),"000000")

which will return 051006 as text


Regards,

Peo Sjoblom
 
Top