iphone - Conversion of date function in sqlite -


Try changing the date format "2011-03-25 15: 00: 00.0" to "2011-03-25" Getting Sqlite and Getting Deeper Problems

When I run this line, then it works fine: sqlite & gt; Select striptime ("% y-% m-% d", 'now'); 2011-03-16

But when I run this line, it loses: sqlite & gt;

What am I doing wrong in this?

Sagos

date_start Remove quote from pre> ~ e $ sqlite3 Enter ".help" for SQLite version 3.7.5 instructions SQL statements are ";" SQLite & gt; Create a Table Test (DT); SQLite & gt; Insert test values ​​(22222222); SQLite & gt; Select the striptime from the test ("% Y-% m-% d", DT); 5613-14-26 m² & gt; Insert in test values ​​(2222222); SQLite & gt; Select the striptime from the test ("% Y-% m-% d", DT); 5613-14-26 1372-02-19 Squall & gt; SQLite & gt; Select substrate ('2011-03-22 08: 00: 00.0', 1,19); 2011-03-22 08:00:00 sqlite & gt; Enter into test values ​​('2011-03-22 08: 00: 00.0'); SQLite & gt; Select the striptime from the exam ("% Y-% m-% d", substrate (DT, 1,19)); 5613-14-26 1372-02-19 2011-03-22

Comments