Converts a datetime value to a formatted string, using Excel format strings.
function TryFormatDateTime1904(const Fmt: string; value: TDateTime; const Dates1904: boolean; const LocalSettings: TFormatSettings): string; overload;
AnsiString TryFormatDateTime1904(const AnsiString Fmt, TDateTime value, const boolean Dates1904, const TFormatSettings LocalSettings);
|
Parameters |
Description |
|
const Fmt: string |
Format string in Excel notation. (something like "dd/mmm/yyyyy hh:ss") |
|
value: TDateTime |
DateTime we want to format. |
|
const Dates1904: boolean |
A boolean indicating if the workbook uses 1904 or 1900 dates. Note that the result will be different depending on this parameter. You will normally get the value for this parameter from TFlexCelImport.Options1904Dates |
|
const LocalSettings: TFormatSettings |
Locale settings used for the conversion. If for example the locale is Spanish, the resulting string might be "5 de Abril" instead of "April 5" |
The datetime formatted as a string.
This method correctly handles 1904 dates, so it should be used instead of TryFormatDateTime.
|
Copyright (c) 2002-2008 TMS Software. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|