Converts a TDateTime value to a string.
function DateTimeToStr(const DateTime: TDateTime): string; overload; function DateTimeToStr(const DateTime: TDateTime; const FormatSettings: TFormatSettings): string; overload;
AnsiString DateTimeToStr(const TDateTime DateTime); AnsiString DateTimeToStr(const TDateTime DateTime, const TFormatSettings FormatSettings);
The first form of DateTimeToStr is not thread-safe, because it uses localization information contained in global variables. The second form of DateTimeToStr, which is thread-safe, refers to localization information contained in the FormatSettings parameter. Before calling the thread-safe form of DateTimeToStr, you must populate FormatSettings with localization information. To populate FormatSettings with a set of default locale values, call GetLocaleFormatSettings.
C++ Examples:
Delphi Examples:
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|