Hi Team,


We have identified an issue with SQLite database which seems to be a potential 


In SQLite database, All the values of datetime fields are saved as text without 
any format check. We can save any text value in the datetime column. This 
behavior is creating problem for us because for different regional settings,  
datetime values are getting saved in different format.


For example, if the regional format is English(United States), the value is 
saved as "2017-09-21 00:00:00" but if the regional format is Finnish(Finland), 
the value is saved as "2017-10-27 00.00.00". So some dates have colon(:) as 
time separator and some dates have dot (.) as time separator.


Below query can illustrate the problem:


Create Table Table1(TestDate DATETIME);


Insert Into Table1 values (datetime('now','localtime'));


insert into Table1 values ("2017-11-01 17:31:41");


insert into Table1 values ("2017-11-01 17.32.41");


insert into Table1 values ("Testing");


select * from Table1;


Can you please let us know if there is any way we can force the datetime field 
to have the datetime values in same format only.



Rajat Pal
sqlite-users mailing list

Reply via email to