[fpc-pascal] ShortDateFormat

David Copeland david.copeland at jsidata.ca
Thu May 7 18:25:07 CEST 2015


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.



More information about the fpc-pascal mailing list