Converts the metadata signature value to a datetime.
If the metadata value cannot be converted, an exception is raised. When the original value is string‑based, the default culture from SignatureSettings.default_culture is used for conversion.
defto_date_time(self):...
Returns: datetime: The metadata signature value as a datetime.
Example
fromgroupdocs.signatureimportSignaturefromgroupdocs.signature.optionsimportMetadataSearchOptionswithSignature("signed.pdf")assignature:result=signature.search([MetadataSearchOptions()])formetadatainresult.signatures:try:dt=metadata.to_date_time()print(f"{metadata.name} as datetime: {dt}")exceptExceptionase:print(f"Could not convert {metadata.name} to datetime: {e}")
to_date_time
Converts the metadata signature value to a datetime.
defto_date_time(self,provider):...
Parameter
Type
Description
provider
System.IFormatProvider
Format data provider to use with data conversion operations.
Returns: datetime.datetime: The metadata signature value as a datetime.
Throws an exception if the metadata value could not be converted.