Re: Using time conditions in vbs?
- From: "Evertjan." <exjxw.hannivoort@xxxxxxxxxxxx>
- Date: 17 Dec 2008 23:08:28 GMT
Chip Orange wrote on 18 dec 2008 in microsoft.public.scripting.vbscript:
I too need to understand time and it's possibilities in VBScript. Is
it possible to do date/time arithmetic in VBScript? I need to take
the difference between 2 times and come up with the number of seconds
that have passed, is this possible?
DateDiff(interval, date1, date2 [,firstdayofweek[, firstweekofyear]])
Arguments
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.
date1, date2
Required. Date expressions. Two dates you want to use in the calculation.
firstdayofweek
Optional. Constant that specifies the day of the week. If not specified,
Sunday is assumed. See Settings section for values.
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.
Settings
The interval argument can have the following values:
Setting Description
yyyy
Year
q
Quarter
m
Month
y
Day of year
d
Day
w
Weekday
ww
Week of year
h
Hour
n
Minute
s
Second
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
.
- Follow-Ups:
- Re: Using time conditions in vbs?
- From: Richard Mueller [MVP]
- Re: Using time conditions in vbs?
- References:
- Using time conditions in vbs?
- From: D.P. Roberts
- Re: Using time conditions in vbs?
- From: Pegasus \(MVP\)
- Re: Using time conditions in vbs?
- From: Chip Orange
- Using time conditions in vbs?
- Prev by Date: Re: Using time conditions in vbs?
- Next by Date: Re: Using time conditions in vbs?
- Previous by thread: Re: Using time conditions in vbs?
- Next by thread: Re: Using time conditions in vbs?
- Index(es):
Relevant Pages
|