DateTime.FromDouble

Syntax

FromDouble(Value: Double): DateTime;

Parameters

Value - real value that must be cast to the date and time format.

Description

The FromDouble method returns the date and time value obtained by conversion from the Double format.

Example

Sub Main;

Var

d: DateTime;

Begin

//38718 corresponds to the date 01.01.2006

//39814 corresponds to the date 01.01.2009

d := DateTime.FromDouble(Math.RandBetween(38718, 39814));

Debug.WriteLine(d);

End Sub Main;

After executing the example the development environment console displays a random date and time value obtained by conversion from the Double format.

See also:

DateTime