Skip to main content
`Ctrl`+`K`

# pandas.Timestamp.fromisoformat

classmethod Timestamp.fromisoformat(date_string)

  Construct a Timestamp from a string in ISO 8601 format.

  This classmethod wraps `datetime.datetime.fromisoformat()`, returning a `Timestamp` instead of a `datetime.datetime`.

  Parameters:
    date_string str

      A date-time string in one of the ISO 8601 formats supported by `datetime.datetime.fromisoformat()`.

  Returns:
    Timestamp

      A Timestamp corresponding to the parsed date-time string.

  See also

  `Timestamp`

    Represents a single timestamp, similar to `datetime`.

  `to_datetime`

    Convert argument to datetime.

  `datetime.datetime.fromisoformat`

    The standard library counterpart.

  Examples

      >>> pd.Timestamp.fromisoformat("2023-01-15")
      Timestamp('2023-01-15 00:00:00')

      >>> pd.Timestamp.fromisoformat("2023-01-15T10:30:00")
      Timestamp('2023-01-15 10:30:00')