<<
>>
Quick Contact
01233 666263

ASP DateAdd Function

The DateAdd function in ASP can add and subtract from dates (or - oddly - times) which your code already has. This can help if you are trying to draw a list from a database which covers, say, the last 7 days...

The function is used like...

NewDateTime = DateAdd(ThingsToAdd, QuantityToAdd, DateTimeToStartWith)

As I mentioned before, you can add date or time parts...

  • yyyy - Years
  • m - Months
  • d - Days
  • h - Hours
  • n - Minutes
  • s - Seconds

If you need your website to be able to show live data, why not give us a call to find out more...