logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel
Southwest USA


dailyclick
All times in EST

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

DateAdd Date Function


The DateAdd functon lets you add a certain amount of time to any date. You can determine what will be a week from now, what was 3 days ago, or any other difference.

The format of the DateAdd function is

DateAdd(code, count, date)

Code comes from the table below and indicates what unit of time you are adding to your initial date:

CodeTime Span
yyyyYear
qQuarter
mMonth
yDay of year
dDay
wWeekday
wwWeek of year
hHour
nMinute
sSecond


Count is the number of those units you will be adding - 3 days, 4 hours, 1 month. This can be negative if you want to go backwards in time.

Date is the starting date you wish to begin with.

So to take today's date and figure out what the date was one month ago, you would use

DateAdd("m", -1, Now())

Date and Time Functions

Introduction to ASP Ebook

Download this ebook to get everything you need to know about learning ASP - from a step by step tutorial to function lists, sample code, common errors and solutions, and much more! 101 pages.
Add DateAdd+Date+Function to Twitter Add DateAdd+Date+Function to Facebook Add DateAdd+Date+Function to MySpace Add DateAdd+Date+Function to Del.icio.us Digg DateAdd+Date+Function Add DateAdd+Date+Function to Yahoo My Web Add DateAdd+Date+Function to Google Bookmarks Add DateAdd+Date+Function to Stumbleupon Add DateAdd+Date+Function to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.

g


g features
Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor