I need to convert a date (e.g. 1/1/2005) to a number 20050101 or convert the other way. Does anyone know a formula that can do either one for me? I do not want to convert to a serial number.
To change the string '1/1/2005' to a string '20050101', you could use:
=TEXT(DATEVALUE(A1),"yyyymmdd")
or
=VALUE(TEXT(DATEVALUE(A1),"yyyymmdd"))
to change it to the equivalent number.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.