Changing mm/dd/yyyy To yyyymmdd

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
 
D

Dave Peterson

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
 
J

JW

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.
 
R

RagDyeR

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
 
S

Sheldon

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top