I have an excel that has a column filled with date objects in this form: 20/12/2016.
I would like to convert them to string values of this form: 20161220, how could I achieve that?
I have an excel that has a column filled with date objects in this form: 20/12/2016.
I would like to convert them to string values of this form: 20161220, how could I achieve that?
Based on this answer, simply:
=TEXT(A1,"YYYYDDMM")
Should do the trick.
Verified on Excel 2010.
However, the letters to use for the day, month, and year are locale-dependent; for instance German is:
=TEXT(A1;"JJJJMMTT")
And Greek is:
=TEXT(A1;"εεεεμμηη")
Try this:
=YEAR(A1)&MONTH(A1)&DAY(A1)
This is evaluated by Excel as a text string.