buggins / ddbc

DDBC is DB Connector for D language (similar to JDBC)
78 stars 45 forks source link

setDateTime() and getDateTime() in SQLITEDriver are not compatible with SQLite datetime() format #12

Closed n-i-e closed 6 years ago

n-i-e commented 9 years ago

SQLITEDriver setDateTime() and fromDateTime() are based on D toISOString() and fromISOString() which supports YYYYMMDDThhmmss format, but it is not compatible with SQLite3 datetime functions.

SQLite3 supports various formats such as YYYY-MM-DD HH:MM:SS or YYYY-MM-DDTHH:MM:SS. Details are described in thefollowing document: https://www.sqlite.org/lang_datefunc.html