Excel stores a date as a number: the count of days since January 1, 1900. March 2, 2026 is 46083 underneath; the date format only changes how it looks. That's why you can subtract dates to get days, or add 30 to move a month-ish forward.
=DATE(year, month, day) builds a date from three numbers.
=YEAR(B2), =MONTH(B2) and =DAY(B2) take one apart.
=C2-B2 gives the days between two dates.
DATE rolls over sensibly: month 13 is January of the next year, and day 0 is the last day of the month before. So =DATE(YEAR(B2),MONTH(B2)+3,DAY(B2)) adds three months, even across a year end.
Dates typed as text (often from an export) look right but don't calculate. DATEVALUE turns that text into a real date.