[Lazarus] StrToDateTime question

Salvatore Coppola coppolastudio at gmail.com
Mon May 28 19:01:26 CEST 2012


2012/5/27 Doug Edmunds <dougedmunds at gmail.com>:
> Hello,
>
> How do I convert a string in the format
> yyyy-mm-dd to a DateTime variable?
>
> StrToDateTime('2012-05-26', ????); // what goes there?//
>
>

Lazarus/FPC help (F1) give:

file:///usr/share/doc/fp-docs/2.6.0/rtl/sysutils/tformatsettings.html

TFormatSettings

Record with all the strings that determine formatting

Declaration

Source position: sysinth.inc line 33

type TFormatSettings = record

  CurrencyFormat: Byte;



Currency format string

  NegCurrFormat: Byte;



Negative currency format string

  ThousandSeparator: Char;



Thousands separator character

  DecimalSeparator: Char;



Decimal separator character

  CurrencyDecimals: Byte;



Currency decimals

  DateSeparator: Char;



Date separator character

  TimeSeparator: Char;



Time separator character

  ListSeparator: Char;



List separator character

  CurrencyString: String;



Currency string

  ShortDateFormat: String;



Short date format string

  LongDateFormat: String;



Long Date Format string

  TimeAMString: String;



AM time indicator string

  TimePMString: String;



PM time indicator string

  ShortTimeFormat: String;



Short time format string

  LongTimeFormat: String;



Long time format string

  ShortMonthNames: TMonthNameArray;



Array with short month names

  LongMonthNames: TMonthNameArray;



Array with long month names

  ShortDayNames: TWeekNameArray;



Array with short day names

  LongDayNames: TWeekNameArray;



Long day names

  TwoDigitYearCenturyWindow: Word;



Value for 2 digit year century window

end;




> -dae
>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




More information about the Lazarus mailing list