ibis.expr.api.StringValue.to_timestamp

StringValue.to_timestamp(format_str, timezone=None)

Parses a string and returns a timestamp.

Parameters
  • format_str (A format string potentially of the type '%Y-%m-%d') –

  • timezone (An optional string indicating the timezone,) – i.e. ‘America/New_York’

Examples

>>> import ibis
>>> date_as_str = ibis.literal('20170206')
>>> result = date_as_str.to_timestamp('%Y%m%d')
Returns

parsed

Return type

TimestampValue