Changing mm/dd/yyyy To yyyymmdd

  • Thread starter Thread starter Sheldon
  • Start date Start date
S

Sheldon

Does Excel provide a function to change mm/dd/yyyy to yyyymmdd,
similar to the Format function in Access? I realize I can build
something with Left, Right, Mid and Len but intuitively thought that
this *should be* basic enough for Excel to provide. Note: No leading
zeroes on month or date e.g. 7/4/2007.
Sheldon Potolsky
 
You could use a custom number format of: yyyymmdd

or you could use a helper cell with a formula like:
=text(a1,"yyyymmdd")
where A1 contains the date
 
Select the cells that you want to apply this format to. Right click
and select Format Cells. In the Number tab, select Custom from the
Category listbox. In the Type field, enter yyyymmdd. Click OK.
 
You mention "no leading zeroes on month or date",
so ... do you really want your date to look like:
200774
??
If so, custom format to
yyyymd
--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================


Does Excel provide a function to change mm/dd/yyyy to yyyymmdd,
similar to the Format function in Access? I realize I can build
something with Left, Right, Mid and Len but intuitively thought that
this *should be* basic enough for Excel to provide. Note: No leading
zeroes on month or date e.g. 7/4/2007.
Sheldon Potolsky
 
I did mention wanting an output format of yyyymmdd (20070704) and two
of the suggestions (above), from Dave and RD, worked very well.
Thanks, Sheldon
 
Back
Top