Function to calculate the date value from the year, month and day values.

 

Syntax

function EncodeDate(wYear, wMonth, wDay: word): double;

 

Parameters and return values

Parameter

Type

Value

wYear

word

year value;

wMonth

word

month value;

wDay

word

day value.

 

Function result

Date value that represents the specified year, month, and day.

 

Example


var
  dt: double;
begin
  dt := EncodeDate(1979, 10, 9);
  
  mLogScript(FormatDateTime('mm.dd.yyyy', dt), '');
  
  dt := IncYear(dt, 37);
 
  mLogScript(FormatDateTime('mm.dd.yyyy', dt), '');
end.


Script work result

[14:50:37] (Log "EncodeDate"): 10.09.1979

[14:50:37] (Log "EncodeDate"): 10.09.2016

 

See also

IncYear
mLogScript

Created with the Personal Edition of HelpNDoc: Easy Qt Help documentation editor