Substract dates

  • I need to substract days from a date in a expression and I am not sure how to do. I can do it in sql (getdate() - 30) and it subtracts 30 days from todays date.

    Want do I need to do to get this same result in a expression?

  • Look into DATEADD(). To subtract 30 days from @date you'd use:

    DATEADD(d, -30, @date)

  • That worked with one minor adjustment.

    In the expression I had to put DATEADD("d", -30, @date)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply