pydicom.values.convert_DT_string

pydicom.values.convert_DT_string(byte_string: bytes, is_little_endian: bool, struct_format: Optional[str] = None) → Union[str, pydicom.valuerep.DT, Sequence[Union[str, pydicom.valuerep.DT]]][source]

Return a decoded ‘DT’ value.

Parameters
  • byte_string (bytes) – The encoded ‘DT’ element value.

  • is_little_endian (bool) – True if the value is encoded as little endian, False otherwise.

  • struct_format (str, optional) – Not used.

Returns

If datetime_conversion is True then returns DT or a list of DT, otherwise returns str or list of str.

Return type

str or MultiValue of str or valuerep.DT or MultiValue of DT