# Number of Days Between Two Dates Ignoring Years

#### sushi514

##### New Member
Hi,

I'm trying to create a dynamic formula that works off of today's date, where I am trying to calculate the number of days between today, and a column of dates that can vary.

E.g. =DATEDIF(G53,TODAY(),"YD") where dates in Column G represents someone's start date with the company, so (5/1/2000, 9/23/2016, 2/1/1990, etc.) - dates vary across the board.

My issue of course is that the formula calculates correctly if the reference date in Column G has already passed today's date (ignoring the year). But does not calculate correctly if the date (ignoring the year) has yet to arrive.

Does anyone have any ideas as to how I can update my DATEDIF formula to account for this, outside of me needing to create two different IF formulas depending on if the month/day in Column G is greater or less than today's current date?

### Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

#### etaf

##### Well-known Member
outside of me needing to create two different IF formulas depending on if the month/day in Column G is greater or less than today's current date?
I assume this is what you do NOT want, although only 1 IF
=IF(TODAY()>G53,DATEDIF(G5,TODAY(),"YD"),DATEDIF(TODAY(),G53,"YD"))

#### sushi514

##### New Member
Thanks, I mentioned two IFs because I have another IF condition outside of the topic mentioned - apologies!

Unfortunately this formula still doesn't work for me in cases where the date hasn't yet arrived, still seemingly the number of days after the date occurs, until it reaches today's date.

E.g. - the date is 5/31/2010 and it's giving me 326 days between that date and today, 4/22/2021. I'm looking for the result just to give 39 days, without looking at the year. But yet I'm wondering if there's some way I can incorporate this into one longer formula, (rather than splitting out the one column with the entire 5/31/2010 date to ignore the year), to just look at the month and day.

#### Dave Patton

##### Well-known Member
I left columns C and D since they may be useful.

T202104a.xlsm
ABCDE
1NAME OF PERSONCurrent year -->2021
2JANE31-Jul-0031-Jul-21100100
3ALAN16-Mar-1916-Mar-22328328
Birthday
Cell Formulas
RangeFormula
E1E1=YEAR(TODAY())
C2:C3C2=IF(DATE(\$E\$1,MONTH(B2),DAY(B2))<TODAY(),DATE(\$E\$1+1,MONTH(B2),DAY(B2)),DATE(\$E\$1,MONTH(B2),DAY(B2)))
D2:D3D2=C2-TODAY()
E2:E3E2=IF(DATE(\$E\$1,MONTH(B2),DAY(B2))<TODAY(),DATE(\$E\$1+1,MONTH(B2),DAY(B2)),DATE(\$E\$1,MONTH(B2),DAY(B2)))-TODAY()

Replies
3
Views
168
Replies
2
Views
149
Replies
2
Views
380
Replies
6
Views
175
Replies
5
Views
145

1,181,606
Messages
5,930,868
Members
436,764
Latest member

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

### Which adblocker are you using?

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

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