Thread: Date conversion
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Date conversion

Hi,

Am Mon, 5 Apr 2021 14:28:14 -0700 (PDT) schrieb programmernovice:

I'm wanting to convert a date to a related symbol string.

Example: 7/16/21 to "210716"

12/17/21 to "212217"
Note that when month has a single digit, a "0" must be added before it in the string.


try:
=RIGHT(YEAR(A1),2)&TEXT(MONTH(A1),"00")& TEXT(DAY(A1),"00")

Regards
Claus B.
--
Windows10
Microsoft 365 for business