Forum Discussion

Kerria1276's avatar
Kerria1276
Regular Visitor
11 months ago
Solved

Date.AddDays not working with negative numbers

My formula works when my second argument is a positive number - but just brings back today's date when it's negative:   = Table.AddColumn(#"Changed Type3", "CourseExpiry_Completion_Date", each Date...
  • p45cal's avatar
    p45cal
    10 months ago

    re:"You can see from the following table that when I use positive numbers I get the correct output, and when I use negative I just get today's date (CourseExpiry_Completion_Date1 and CourseExpiry_Completion_Date2):"

    When I look at some of your dates in your screen shot:

    and I put these data into a plain sheet and do the subtraction there I get:

    That means the subtractions are correct.

    So have a look at how the values in column ~.DaysUntilExpiry are calculated!