Utilities.ReplaceDate Method

Applies to TestComplete 15.10, last modified on December 15, 2021
This method is obsolete. See the Remarks section below.

Description

The Utilities.ReplaceDate method changes the value of the DateTime parameter so that it has the same date as the NewDate parameter. The time portion of DateTime remains untouched. ReplaceDate supports negative dates (before 1900).

Declaration

Utilities.ReplaceDate(DateTime, NewDate)

DateTime [in, out]    Required    Variant    
NewDate [in]    Required    Variant    
Result None

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

DateTime

The Variant value holding the date and time value whose date part should be changed. The function stores the modified value to this parameter.

NewDate

The Variant value storing the new date.

Result Value

None.

Remarks

ReplaceDate does not work in JScript, C++Script and C#Script, since these languages do not support the parameters of the out type.

This method is obsolete. It is supported for backward compatibility only. To modify the date part of a DateTime value, use the aqDateTime.SetDateElements method.

See Also

Working With Dates
SetDateElements Method
SetTimeElements Method
AddMonths Method
Now Method
Today Method
StrToDate Method
StrToDateTime Method

Highlight search results