Function to obtain the date/time value of the start of the day from the specified date.

 

Syntax

function StartOfTheDay(dt: double): double;

 

Parameters and return values

Parameter

Type

Value

dt

double

source date/time value.

 

Function result

Date/time value of the start of the day.

 

Example


var
  dt: double;
begin
  dt := IncHour(StartOfTheDay(Now), 10);
  mLogScript(FormatDateTime('mm.dd.yyyy hh:nn:ss', dt), '');
end.


Script work result

[22:22:14] (Log "StartOfTheDay"): 18.09.2016 10:00:00

[22:22:14] (Run "StartOfTheDay"): Script operation time: 6 ms

[22:22:14] (Run "StartOfTheDay"): Script done successfully.

 

See also

FormatDateTime

IncHour
mLogScript

Now