[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Try to convert a string with date/time indication to a TDateTime value
Source position: datih.inc line 173
function TryStrToDateTime( |
const S: ShortString; |
out Value: TDateTime |
):Boolean; |
const S: AnsiString; |
out Value: TDateTime |
):Boolean; |
const S: string; |
out Value: TDateTime; |
const FormatSettings: TFormatSettings |
):Boolean; |
TryStrToDateTime tries to convert the string S to a TDateTime date and time value, and stores the result in Value. The date must consist of 1 to three digits, separated by the DateSeparator character. If two numbers are given, they are supposed to form the day and month of the current year. If only one number is given, it is supposed to represent the day of the current month (This is not supported in Delphi). The time must consist of 1 to 4 digits, separated by the TimeSeparator character. If two numbers are given, they are supposed to form the hour and minutes.
The function returns True if the string contained a valid date and time indication, False otherwise.
|
Try to convert a string with a date indication to a TDateTime value |
|
|
Try to convert a string with a time indication to a TDateTime value |
|
|
Convert a date/time string to a TDateTime value. |
|
|
Convert a time string to a TDateTime value. |
|
|
Converts a TDateTime value to a date string with a predefined format. |
|
|
Convert a TDateTime time to a string using a predefined format. |