ibis.expr.api.StringValue.to_timestamp

StringValue.to_timestamp(arg, format_str, timezone=None)

Parses a string and returns a timestamp.

Parameters
format_strA format string potentially of the type ‘%Y-%m-%d’
timezoneAn optional string indicating the timezone,

i.e. ‘America/New_York’

Returns
parsedTimestampValue

Examples

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