I am trying to trim the data using trim but still it does not trim: it shows new line and space after each line.
Am I doing wrong or is it not possible or do I have to use any other functions? Any help greatly appreciated.
sqlite> select distinct trim(date_start) from test;
2011-03-22 08:00:00.0
2011-03-22 09:00:00.0
Are you sure the characters you're trying to trim are spaces? What you're doing should work:
sqlite> create table test (date_start text);
sqlite> insert into test values (' 2011-03-22 08:00:00.0');
sqlite> insert into test values (' 2011-03-22 09:00:00.0');
sqlite> select * from test;
2011-03-22 08:00:00.0
2011-03-22 09:00:00.0
sqlite> select distinct trim(date_start) from test;
2011-03-22 08:00:00.0
2011-03-22 09:00:00.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With