1. Home
  2. Computing & Technology
  3. Delphi Programming
Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back

Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
 

FloatToDateTime

unit
SysUtils
category
Floating point conversion routines

declaration
function FloatToDateTime(const Value: Extended): TDateTime; overload;

description
Returns a TDateTime value from a floating point value.

If Value is not within the valid range for TDateTime, FloatToDateTime raises an EConvertError exception; min and max TDateTime values are defined as constants:

const
  MinDateTime: TDateTime = -657434.0; { 01/01/0100 12:00:00.000 AM }
  MaxDateTime: TDateTime = 2958465.99999; { 12/31/9999 11:59:59.999 PM }

example
var aDateTime: string;

aDateTime := FloatToDateTime(0); 
//aDateTime == 12/30/1899

aDateTime := FloatToDateTime(10); 
//aDateTime == 09/01/1900


in real code

see also
TDateTime,


 Free Delphi code snippet inside every Delphi Newsletter!
Subscribe to the Newsletter
Name
Email

 Got some code to share? Got a question? Need some help?
Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.