On 4 May 2016, at 9:43pm, Roman Fleysher <roman.fleysher at einstein.yu.edu> 
wrote:

> when I insert '2015-08-10T17:19:37.670' or '2015-08-10 17:19:37.670' fails. 
> Why?

Take a look at the result of "datetime(AcquisitionDateTime)" .  You can use the 
SQLite shell tool.

> How to do it properly?

I suspect you want something like 

CHECK (AcquisitionDate IS datetime(datetime(AcquisitionDateTime, 'unixepoch')))

However I would be wary of how timezones are handled.

SQLite is actually a poor way to check something as complicated as a time 
string.  It would be far better to do it in your application.

Simon.

Reply via email to