Substract two date and get the result in date format

Sub two date and get the result in date formate for example date1:12/31/2019 and date2 :08/30/2018 by adding date 1 and date 2 I should get 04/01/0001

Hi @sruthesanju

Try this DateDiff(“d”,“12/31/2019”,“12/30/2018”)

I need the result in date format

lets try to sort it out:

the substraction of these two dates has a result of -488 days

and it will be different in case of leap years are involved

the corresponding datatype is

it looks that you are interessted on a structure / split info on the year, month, day differences
we can do like below

But a dateTime like
represents the first April in the first year of calendar and is not indicating a timespan of 488 days

Use DateDiff to find the amount of time between them, then use DateAdd to subtract that amount of time from one of the dates.