Function to obtain the date/time value of the end of the year from the specified date.
function EndOfTheYear(dt: double): double;
Parameter |
Type |
Value |
---|---|---|
dt |
double |
source date/time value. |
Date/time value that represents the last second of the last day of the selected year.
var
dt, dtNow: double;
begin
dtNow := Now;
dt := EndOfTheYear(dtNow);
mLogScript(FormatDateTime('mm.dd.yyyy hh:nn:ss', dtNow), 'Now');
mLogScript(FormatDateTime('mm.dd.yyyy hh:nn:ss', dt), 'EndOfTheYear');
end.
[18:08:18] (Log "EndOfTheYear"): [Now] 12.13.2016 18:08:18
[18:08:18] (Log "EndOfTheYear"): [EndOfTtheYear] 12.31.2016 23:59:59
[18:08:18] (Run "EndOfTheYear"): Script operation time: 9 ms
[18:08:18] (Run "EndOfTheYear"): Script done successfully.