ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Year function does not work (https://www.excelbanter.com/excel-discussion-misc-queries/16147-year-function-does-not-work.html)

aeronaut

Year function does not work
 
I have the following in cells U6 and V6:

Cell U6 V6
Contents 1/7/1999 =YEAR(U6)

Cell V6 should return 1999, but it returns 6/21/1905 instead.
I thank for your help.

Andras

Chip Pearson

You need to format cell V6 as General not a date. Dates are
stored as the number of days since 0-Jan-1900, and the date
6/21/1905 is 1999 days since 0-Jan-1900.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"aeronaut" wrote in message
...
I have the following in cells U6 and V6:

Cell U6 V6
Contents 1/7/1999 =YEAR(U6)

Cell V6 should return 1999, but it returns 6/21/1905 instead.
I thank for your help.

Andras




aeronaut

I thank you. This fixed it.
Andras

"Chip Pearson" wrote:

You need to format cell V6 as General not a date. Dates are
stored as the number of days since 0-Jan-1900, and the date
6/21/1905 is 1999 days since 0-Jan-1900.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"aeronaut" wrote in message
...
I have the following in cells U6 and V6:

Cell U6 V6
Contents 1/7/1999 =YEAR(U6)

Cell V6 should return 1999, but it returns 6/21/1905 instead.
I thank for your help.

Andras






All times are GMT +1. The time now is 05:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com