Datetime.SetDate

Parent Previous Next

Datetime.SetDate.

Inserts the specified date into the current instance while preserving the time. If it does not have an assigned time value, time is implicit set to zero. Returns Self for a possible continuation of operations.


Syntax.


 SetDate(Integer year, month, day) : <Self>

 


Arguments:

Argument

Value range

year

month

day

1 .. 9999

1 .. 12

1 .. 31


Example:


 Datetime dtMy.SetDate(2050, 2, 15);

 String s := dtMy.ToString(); //Now s == "20500215 00:00:00.000";