In DuckDB, the strptime()
function converts a date/time string into a valid timestamp value. We pass a format string to the function in order to tell it what format our string uses. This can be handy if we ever need to construct timestamps based on date/time strings that may or may not be in a valid format.
But what if we have multiple date/time strings in different formats?
Fortunately, the strptime()
function caters for this scenario too.