close

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?


1.

=TEXT(A1,quot;yyyymmddquot;)

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

=YEAR(A1)

or

if done on the text function

=LEFT(B1,4)

or if you want a number

=--LEFT(B1,4)

--

Regards,

Peo Sjoblom

nwexcelsolutions.com
quot;juamigquot; gt; wrote in message
...
gt; Is there an easy way to change a date format from mm/dd/yy to yyyymmdd?
gt;
gt; Also how would I perform the function of only coping over the year to a
gt; new
gt; column once I have it in the yyyymmdd format?
This worked, thank you.

quot;Peo Sjoblomquot; wrote:

gt;
gt; 1.
gt;
gt; =TEXT(A1,quot;yyyymmddquot;)
gt;
gt; this will make it text, otherwise you can just use a custom format like
gt; yyyymmdd
gt; that way it will still be the same date, however if you type the date as
gt; yyyymmdd it will be the incorrect date
gt;
gt;
gt; 2.
gt;
gt; =YEAR(A1)
gt;
gt; or
gt;
gt; if done on the text function
gt;
gt; =LEFT(B1,4)
gt;
gt; or if you want a number
gt;
gt; =--LEFT(B1,4)
gt;
gt; --
gt;
gt; Regards,
gt;
gt; Peo Sjoblom
gt;
gt; nwexcelsolutions.com
gt;
gt;
gt;
gt; quot;juamigquot; gt; wrote in message
gt; ...
gt; gt; Is there an easy way to change a date format from mm/dd/yy to yyyymmdd?
gt; gt;
gt; gt; Also how would I perform the function of only coping over the year to a
gt; gt; new
gt; gt; column once I have it in the yyyymmdd format?
gt;
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()