int decode_datetime(string timestr)
Converts a database date and time spec to a system time value. Can decode strings missing the time part.
Date and time spec to decode.