![]() Returns a Variant of subtype Date containing the time. Returns a Variant of subtype Date containing the time for a specific hour, minute, and second. Returns the number of seconds that have elapsed since midnight. Returns a Variant of subtype Date indicating the current system time. Returns a whole number between 0 and 59, inclusive, representing the second of the minute. Returns the current date and time according to the date and time set on your computer. Returns a whole number between 0 and 59, inclusive, representing the minute of the hour. Returns a Boolean value indicating whether an expression can be converted to a date. Returns a whole number between 0 and 23, inclusive, representing the hour of the day. Returns an expression formatted as a date or time. Returns the specified part of a given date. Returns the number of intervals between two dates. Returns the date to which the specified time interval has been added. Returns an expression that has been converted to a Variant of subtype Date. ![]() Here is a list of built-in functions that can be useful when dealing with dates: Function You can also use these and other built-in VBScript functions in your scripts. If the object name precedes the function name (for instance, aqDateTime.Now), then a TestComplete method is called if the object name is missing (for instance, Now), then a built-in function of VBScript is called. VBScript has two functions with names that coincide with the names of aqDateTime’s methods. The aqDateTime and aqConvert objects are available for all supported scripting languages, so that you can use them to operate with date values regardless of the chosen language. Returns the Date variable having the specified hour, minute and second.Ĭalculates the absolute difference between two date/time values.Īnother object, aqConvert, provides methods to convert between date values and their string equivalents: MethodĬonverts the given date value to a string using the specified format.Ĭonverts the given date value to a string.Ĭonverts the specified string to a date/time value.Ĭonverts the specified string to a time value. ![]() Returns the Date variable having the specified date and time portions.Īssigns the specified date and time as the system date and time. Returns the seconds part of the specified time value. Returns the minutes part of the specified time value. Returns the hours part of the specified time value. MethodĪdds or subtracts the specified number of hours to (from) the given date.Īdds or subtracts the specified number of minutes to (from) the given date.Īdds or subtracts the specified number of seconds to (from) the given date.Īdds or subtracts the specified number of days, hours, minutes and seconds to (from) the given date. TestComplete has an aqDateTime object that contains methods that can be useful when operating with date-time values. Objects and Functions for Working With Time Values However the time value can vary more than 24 hours and may result in a date-time value that has an integer part. When you are only working with time values the integer part can be omitted. TestComplete provides several routines that help you convert these values to their string representation (see below).īelow are some examples of date-time values and their meaning: Value However, you do not have to understand what these floating-point values represent. The number after the decimal separator is time partition: it represents the fraction ofĪ 24-hour period that has elapsed. The integer part of this value represents the number of days that have passed since December 30, 1899. Since the TestComplete scripting engine only supports OLE-compatible data types, the date-time values are implemented as floating-point variant values Each time value includes a date part and vice versa. Operations over time values are very similar to operations over dates.
0 Comments
Leave a Reply. |