Formula for changing date format

G

Guest

Is there an easy way to change a date format from mm/dd/yy to yyyymmdd?

Also how would I perform the function of only coping over the year to a new
column once I have it in the yyyymmdd format?
 
P

Peo Sjoblom

1.

=TEXT(A1,"yyyymmdd")

this will make it text, otherwise you can just use a custom format like
yyyymmdd
that way it will still be the same date, however if you type the date as
yyyymmdd it will be the incorrect date


2.

=YEAR(A1)

or

if done on the text function

=LEFT(B1,4)

or if you want a number

=--LEFT(B1,4)

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com
 
G

Guest

This worked, thank you.

Peo Sjoblom said:
1.

=TEXT(A1,"yyyymmdd")

this will make it text, otherwise you can just use a custom format like
yyyymmdd
that way it will still be the same date, however if you type the date as
yyyymmdd it will be the incorrect date


2.

=YEAR(A1)

or

if done on the text function

=LEFT(B1,4)

or if you want a number

=--LEFT(B1,4)

--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com
 

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