My date information was retrieved from our system without the year and in the format "mm/dd".

As a result, when I decrease the value between the previous and current years, I run into an issue.

Example: Date action Date Check Result Current Date
12/21 01/03 -352 03/18/2022

The correct result is: Date action Date Check Result Current Date
12/21 01/03 13 03/18/2022

How to subtract correctly?
Dec 25, 2022 in Others 498 views

I suppose Excel has handled December 21 and January 3 as dates, but that it has always assumed the current year. From cell A2, this subtracts one year.

```=DATE(YEAR(A2)-1,MONTH(A2),DAY(A2))
```

For instance, check to see if the earlier date is one month earlier than the later date; if not, subtract one year from the earlier date and then compute the difference.

```  +------------+------------+------+
|      A     |     B      |   C  |
1 |   earlier  |   latter   | diff |
+------------+------------+------+
2 | 2022-12-21 | 2022-01-03 |   13 |
+------------+------------+------+

in cell C2

=IF(MONTH(A2) > MONTH(B2),B2-DATE(YEAR(A2)-1,MONTH(A2),DAY(A2)),B2-A2)```
• 63,700 points

How to change date format from 201904 to Apr-19 in excel

This 201904 is recognised as a number ...READ MORE

Convert column in excel date format (DDDDD.tttt) to datetime using pandas

Given # s = df['date'] s 0 ...READ MORE

How to format numbers as lakhs and crores in excel/ google spreadsheet when the number could be negative too?

Excel formatting, in my opinion, can only ...READ MORE

How to format numbers in excel in crores or lacks

Try this: =TEXT(A1/10000000,"#,### \cr") READ MORE

Change date format of cell in excel from dd.mm.yyyy to yyy/mm/dd ( excel version 2013 )

Hello :)   Excel’s Format Cells function can quickly ...READ MORE

Calculate Birthdate from an age using y,m,d in Excel

Hi To Calculate the date, we can ...READ MORE

Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE