RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.DateTimeToFileDate Function

Converts a TDateTime value to an OS timestamp value.

Pascal
function DateTimeToFileDate(DateTime: TDateTime): Integer;
C++
int DateTimeToFileDate(TDateTime DateTime);

A timestamp is a signed 32-bit integer, used by the Operating System to record information such as the date and time a file was modified. The precise format of a timestamp depends on the OS. Use DateTimeToFileDate to convert a TDateTime value to an OS timestamp value. 

DateTimeToFileDate is particularly useful for converting the Time field of the TSearchRec type used by the FindFirst and FindNext functions. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!