int decode_date(string datestr)
Converts a database date-only spec to a system time value. Assumes 4-digit years.
Date spec to decode.