On 11/8/2012 8:40 PM, YAN HONG YE wrote:
sqlite> select fmn,supplierDate from t93c_adl where fmn like '85493%';
854939|11/15/2012

Values in supplierDate column are not in a format that SQLite's date/time functions recognize. They expect '2012-11-15', that is year-month-day. If you are willing to reformat the column, you can do so by running this statement:

update t93c_adl set supplierDate=substr(supplierDate, 7) || '-' || substr(supplierDate, 1, 2) || '-' || substr(supplierDate, 4, 2);

*After* this is done, date() would work as expected:

select date(supplierDate,'+2 days') from t93c_adl;
--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to