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
Don Guillett - 16 Oct 2007 14:06 GMT
If? it is a date number then just change the format.

Signature
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com
> 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
Dave Peterson - 16 Oct 2007 14:27 GMT
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
> 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

Signature
Dave Peterson
JW - 16 Oct 2007 14:30 GMT
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.
> 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
RagDyeR - 16 Oct 2007 15:17 GMT
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

Signature
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
Sheldon - 17 Oct 2007 16:50 GMT
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
> You mention "no leading zeroes on month or date",
> so ... do you really want your date to look like:
[quoted text clipped - 17 lines]
> zeroes on month or date e.g. 7/4/2007.
> Sheldon Potolsky