Get the Number of Days Between Two Dates

# Thread: Get the Number of Days Between Two Dates

1. Member
Join Date
Dec 1969
Posts
43

## Get the Number of Days Between Two Dates

How do I get the number of days between two dates?

2. Rhino Guest

## RTFM

The manual can be found at:<BR><BR>http://msdn.microsoft.com/scripting/default.htm?/scripting/vbscript/doc/vbstoc.htm<BR><BR>You need to look at the function DateDiff()

3. Senior Member
Join Date
Dec 1969
Posts
240

## RE: RTFM

Use DateDiff function ( vbscript )<BR><BR>datediff("d", date1, date2) and this will return you the number of day ( "d" ) between these 2 date...<BR><BR>=================================== ======<BR>DateDiff(interval, date1, date2 [,firstdayofweek[, firstweekofyear]])<BR>The DateDiff function syntax has these parts:<BR><BR>Part Description <BR>interval Required. String expression that is the interval you want to use to calculate the differences between date1 and date2. See Settings section for values. <BR>date1, date2 Required. Date expressions. Two dates you want to use in the calculation. <BR>firstdayofweek Optional. Constant that specifies the day of the week. If not specified, Sunday is assumed. See Settings section for values. <BR>firstweekofyear Optional. Constant that specifies the first week of the year. If not specified, the first week is assumed to be the week in which January 1 occurs. See Settings section for values. <BR><BR><BR><BR>Settings<BR>The interval argument can have the following values:<BR>Setting Description <BR>yyyy Year <BR>q Quarter <BR>m Month <BR>y Day of year <BR>d Day <BR>w Weekday <BR>ww Week of year <BR>h Hour <BR>n Minute <BR>s Second <BR><BR>

4. Rhino Guest

## Quite correct ...

but she has probably worked it out by now through reading the documentation in the link I posted about 20 mins ago.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•