days and months with heading zero from formula

A

abc

Hi all

I'm using this little formula to create a string that I use to do some
further computations

=YEAR(C88)&"-"&MONTH(C88)&"-"&DAY(C88)

the formula extracts the year,month,day from a date format cell like C88

that is MM/DD/YYYY

The problem is that if either the month or day are <10 I do not get the
heading zero from the formula.

example: C88=01/02/2003 ; my formula gives me a string 2003-2-1 instead
of 2003-02-01, which is what I need.

Is there any way to add the zero or extract the month and day so that
they keep the heading zero?

thanks
 

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