Convert standard SQL DATE and TIMESTAMP to Lisp universal time.
sql
encode-db-standard-date date-string => result
encode-db-standard-timestamp timestamp-string => result
date-string⇩ |
A string. |
timestamp-string⇩ |
A string. |
result |
A Lisp universal time or nil . |
The functions encode-db-standard-date
and encode-db-standard-timestamp
interpret their argument as a DATE or TIMESTAMP and return the corresponding universal time.
date-string must be a string of length at least 10, where the first 10 characters specify a DATE, that is have the format YYYY-MM-DD.
timestamp-string must be a string of length at least 19, where the first 19 characters specify a TIMESTAMP, that is have the format YYYY-MM-DD HH:MM:SS.
encode-db-standard-date
and encode-db-standard-timestamp
do not actually check the separators between the numeric values, so the hyphens, space and colons can each be replaced by any character. Both functions return nil
if the argument is not correct.
decode-to-db-standard-date
decode-to-db-standard-timestamp
connect
23.6 Working with date fields
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:56