[fpc-pascal] ShortDateFormat
David Copeland
david.copeland at jsidata.ca
Thu May 7 18:30:06 CEST 2015
Sorry, I think I just answered my own question :-! . Woult using the
TFormatsetting variant of StrToDateTime be the "better way"?
Dave.
On 05/07/2015 12:25 PM, David Copeland wrote:
> Hi all,
>
> I am using the following bit of code to convert a date from an external
> source.
>
> var
> timestamp: TDateTime;
> event_date, event_time: string;
> begin
> ShortDateFormat := 'm/d/y';
> try
> timestamp := StrToDateTime(event_date + ' ' + event_time);
> except
> // error handling ...
> end;
> end;
>
> However, the compiler warns that ShortDateFormat is deprecated. Is there
> another way to accomplish this?
>
> Thanks,
> Dave Copeland.
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
More information about the fpc-pascal
mailing list