Converts a datetime value to a formatted string, using Excel format strings.
function TryFormatDateTime1904(const Fmt: string; value: TDateTime; const Dates1904: boolean): string; overload;
AnsiString TryFormatDateTime1904(const AnsiString Fmt, TDateTime value, const boolean Dates1904);
|
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 |
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!
|