Automation testing QTP with VB Script functions Interview questions


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

DatePart Function?

DatePart function returns the specified part of a given date.

Syntax: DatePart(interval, date[, firstdayofweek[, firstweekofyear]])

Arguments:
interval: (Required) String expression that is the interval of time you want to return.
date: (Required) Date expression you want to evaluate.
firstdayof week: (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:  

'DatePart
Print DatePart("yyyy","November 01, 2008")          
Output:    2008

 




Next 5 interview question(s)

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

Comments