SQL statement for Insert time
Insert into[DataTable]([Collectdatetime],[Channel_1],[channel_2],[Channel_3],[Channel_4],[channel_5],[Channel_6],[channel_7],[Channel_8],[Channel_9],[channel_10],[Channel_11],[Channel_12],[channel_13],[channel_14],[channel_15],[channel_16],[channel_17],[channel_18],[channel_19],[channel_20],[channel_21],[channel_22],[channel_23],[channel_24],[channel_25],[channel_26],[channel_27],[channel_28],[channel_29],[channel_30],[channel_31],[channel_32],[channel_33],[channel_34],[channel_35],[channel_36],[channel_37],[channel_38],[channel_39],[channel_40],[channel_41],[channel_42],[channel_43],[channel_44],[channel_45],[channel_46],[channel_47],[channel_48],[channel_49],[channel_50],[channel_51],[channel_52],[channel_53],[channel_54],[channel_55],[channel_56],[channel_57],[channel_58],[channel_59],[channel_60])Values('2014-11-17t19:37:32','-152','-416','-170','-128','-154','-110','-122',' -','-227','-90','-80','-98','-18','-29',' -','-29','-71','-50','-76','-128','6','192',' the',' $',' +',' -','118',' +',' the',' -',' -','-112','-7','-133','-71','-23','-79','-127','-6','-119','232','-101','-146','-309','-127','-212','-181','-152','-62','-68','161',' the',' +',' the','104',' at','288',' +','287','-61')
Time format ' 2014-11-17t19:37:32 '
Month day and hour and seconds between a letter T, when saved to the database, will automatically give time to add 8 hours. The saved result is 2014-11-18 03:37:32
Time format ' 2014-11-17 19:37:32 ' when saving to the database, save directly. The saved result is 2014-11-17 19:37:32
Use this statement to read data from the data
Sqliteconnectionstringbuilder s = new Sqliteconnectionstringbuilder ();
S.datasource = Dbname;//dbname is the path that contains the database file name
S.datetimekind = datetimekind.local;
ConnectString = S.tostring ();
The data stored above, read out, all is 2014-11-17 19:37:32
However, the time to filter the condition must be more than 2014-11-18 03:37:32, otherwise, the filter will not be ' 2014-11-17t19:37:32 '
If you comment out the above statement s. DateTimeKind = datetimekind.local;
When querying, it is also the same effect, the time to filter the condition must be more than 2014-11-18 03:37:32, otherwise it will not be able to filter out the time required
If the S. DateTimeKind set to S.datetimekind = DATETIMEKIND.UTC;
Filter time, still need to follow more than 2014-11-18 03:37:32 to filter, read the time display or 2014-11-17 19:37:32
Depressed, completely do not know the meaning of setting datetimekind
Need to find a time to write a demo to study
The time in SQLite