View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Changing a Date into a Value

Try one of these:

This returns a *text* string:

=TEXT(A1,"yyyymmdd")

This returns a numeric number:

=--TEXT(A1,"yyyymmdd")

--
Biff
Microsoft Excel MVP


"Confused_in_Houston" wrote in
message ...
I have cells that contain dates in the format 2008-04-07. I want to
convert
that to 20080407. I've tried RIGHT and MID functions but it works with
the
integer that underlies the date. I've cut the date and pasted it as a
value
but it again reverts to the underlying integer.

How can I convert a date like 2008-04-07 to a value 20080407?

Thanks...