pydicom.values.convert_TM_string

pydicom.values.convert_TM_string(byte_string: bytes, is_little_endian: bool, struct_format: str | None = None) str | TM | MutableSequence[str] | MutableSequence[TM][source]

Return a decoded ‘TM’ value.

Parameters:
  • byte_string (bytes) – The encoded ‘TM’ 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 either TM or a list of TM, otherwise returns str or list of str.

Return type:

str or list of str or valuerep.TM or list of valuerep.TM