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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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
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,214,960
Messages
6,122,479
Members
449,088
Latest member
Melvetica

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
Back
Top