Saving you valuable time at Goldhosts

Website Design and Hosting

You are here: Home > FAQ's > Knowledge > ASP DateAdd Function

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 | Legal | Site Map

GoldHosts, 152 Godinton Road, Ashford, Kent, TN23 1LN, England UK.
Tel: Ashford (01233) 666263

© GoldHosts 1998 - 2012