SQLTeam.com | Weblogs | Forums

How do I add 30 days to sales date to show that new date


#1

I have to construct a query that shows the expected payment date if invoices are due within 30 days of a transaction.
I think its +30 to the invoice date and I'm going to show this as a new column called "Payment_Due Date" I'm stuck on this syntax.


#2
select ...
      ,dateadd(dd,30,invoice_date) as payment_due_date
  from ...
 where invoice_date>=dateadd(dd,-30,getdate())

#3

Thanks bitsmed