Date results problem

mjrlmr71297

New Member
Joined
Mar 20, 2009
Messages
3
today() = 3/20/2009

=year(today())

When using this formula the result I get is 2009, which is correct.

When I change the format to get just a 2-digit date ie 09, the result I get is 05

similar issue when using =month()

I don not understand why this is happening. any help is apprecaited.:confused:
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

mjrlmr71297

New Member
Joined
Mar 20, 2009
Messages
3
it screws up when i change to a custom format so that I only get a 2 digit date ex: I want 09 for the year and 03 for the month
 
Upvote 0

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,124
Dates are integers, YEAR(TODAY()) = integer 2009 which equates to date 1st July 1905 which is why you get 05, you want to either use:
=TEXT(TODAY(),"yy")

or better yet just =TODAY() and format cell to custom format of: yy
 
Upvote 0

Forum statistics

Threads
1,191,609
Messages
5,987,651
Members
440,105
Latest member
thigarette

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top