Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

StrToDateDef

Convert string to date, returning a default value.

Declaration

Source position: datih.inc line 189

function StrToDateDef(

  const S: ShortString;

  const Defvalue: TDateTime

):TDateTime;

function StrToDateDef(

  const S: ShortString;

  const Defvalue: TDateTime;

  separator: AnsiChar

):TDateTime;

function StrToDateDef(

  const S: string;

  const Defvalue: TDateTime

):TDateTime;

function StrToDateDef(

  const S: string;

  const Defvalue: TDateTime;

  separator: char

):TDateTime;

Description

StrToDateDef tries to convert the string S to a valid TDateTime date value, and returns DefValue if S does not contain a valid date indication.

Errors

None.

See also

StrToDate

  

Convert a date string to a TDateTime value.

TryStrToDate

  

Try to convert a string with a date indication to a TDateTime value.

StrToTimeDef

  

Convert string to time, returning a default value.


Documentation generated on: Nov 23 2024