ImageEn, unit iepdf

PdfDateToDateTime


Declaration

function PdfDateToDateTime(PdfDate: string): TDateTime;


Description

Converts a PDF date string to a TDateTime value.

PDF dates are formatted as:

D:YYYYMMDDHHmmSSOHH'mm'

Where:

YYYY is the year
MM is the month
DD is the day (01-31)
HH is the hour (00-23)
mm is the minute (00-59)
SS is the second (00-59)
O is the relationship of local time to Universal Time (UT), denoted by one of the characters +, -, or Z (see below)
HH followed by ' is the absolute value of the offset from UT in hours (00-23)
mm followed by ' is the absolute value of the offset from UT in minutes (00-59)


Example

dtPdfDate := PdfDateToDateTime( 'D:20220706195200-08''00''' );   // D:20221223195200-08'00' which is 6 July 2022, 7:52 PM, U.S. PST


See Also

DateTimeToPdfDate