Automation testing QTP with VB Script functions Interview questions


Total available count: 68
Subject - Software Testing
Subsubject - Automation testing QTP with VB Script functions

DateDiffFunction?

DateDiff function returns the number of intervals between two dates. 

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

Example: 

'DateDiff 
Print DateDiff("yyyy","November 01, 2008","November 01, 2009") 
Output: 1

 




Next 5 interview question(s)

1
DatePart Function?
2
DayFunction?
3
Month Function?
4
MonthName Function?
5
WeekdayFunction_Weekday?

Comments