Changing a Date into a Value

  • Thread starter Confused_in_Houston
  • Start date
C

Confused_in_Houston

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...
 
T

T. Valko

Try one of these:

This returns a *text* string:

=TEXT(A1,"yyyymmdd")

This returns a numeric number:

=--TEXT(A1,"yyyymmdd")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top