Difference between revisions of "ScriptCore3.EncodeDate"
(new page) |
m (→Description) |
||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
==Description== | ==Description== | ||
This function allows to convert given ''Year'', ''Month'' and ''Day'' into a [[TDateTime]] format.<br> | This function allows to convert given ''Year'', ''Month'' and ''Day'' into a [[TDateTime]] format.<br> | ||
− | Note that arguments are '''not''' decimal numbers | + | Note that arguments are '''not''' decimal numbers. |
==Example== | ==Example== | ||
Line 16: | Line 16: | ||
begin | begin | ||
// today (for me) it's 25th August 2013 | // today (for me) it's 25th August 2013 | ||
− | y := 2013 | + | y := 2013; |
m := 8; | m := 8; | ||
d := 25; | d := 25; |
Latest revision as of 10:07, 25 August 2013
function EncodeDate(Year, Month, Day: Word): TDateTime; Year: Year to be encoded Month: Month to be encoded Day: Day to be encoded Result: TDateTime depending on provided Year, Month and Day
Description
This function allows to convert given Year, Month and Day into a TDateTime format.
Note that arguments are not decimal numbers.
Example
var
y,m,d: Word;
currdate: TDateTime;
begin
// today (for me) it's 25th August 2013
y := 2013;
m := 8;
d := 25;
currdate := EncodeDate(y,m,d);
WriteLn(FormatFloat('0',currdate));
// 41511
end.