HPDFParsePDFDate Function

Parses a PDF date string into a TDateTime, accepting the truncated D:YYYYMMDDHHmmSS forms viewers write and the +HH'mm' or -HH'mm' time zone offset

function HPDFParsePDFDate(const S: AnsiString): TDateTime;

The unit is HPDFDoc; it is the read-side counterpart of HPDFFormatPDFDate, which renders a TDateTime back into PDF date text

An input that does not begin with a four-digit year returns zero, so check the result before relying on it as a valid timestamp