Saving you valuable time at Goldhosts



Website Design and Hosting

ASP DateAdd Function

Back to FAQ's.

Back to Knowledge Base.

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...

Dates can be usefull with websites, your customers can be presented with the details that are relevent today, with a website which updates itself automtically!

Home | Hosting | Design | Domains | Contact

Head Office (postal address) GoldHosts, 152 Godinton Road, Ashford, Kent, TN23 1LN, England UK.
Design Office (visiting address) GoldHosts, 24 Church Yard, Ashford, Kent, TN23 1QG, England UK.
T: 01233 666263 F: 01233 636262

© GoldHosts 1998 - 2008