lazreport can't show date field from sqlite lazarus / 16-Databases ---------------------------------------------------------------------- Fai · 2011-08-26 04:44 why lazreport can't show date field from sqlite database? it shows nothing (blank). other field types (varchar, text or number) show the records correctly. i have tried to change the date format in lazreport text editor, but still the record didn't show. can functions in text editor solve this? and how to use it? i tried to type 'formatdatetime(['yyyy-mm-dd'], [Sqlite3DataSet1."putdate"])' but when i click preview report in the designer it only shows : 'formatdatetime()' ?? is sqlite compatible with lazreport? please help.. ---------------------------------------------------------------------- Lacak2 · 2011-08-26 05:27 which database component do you use (TSQLQuery with TSQLite3Connection (sqlDB), Zeos, TSqlite3Dataset) ? I am not expor for lazreport, but try use something like: "[formatdatetime('yyyy-mm-dd', [Sqlite3DataSet1."putdate"])]" ---------------------------------------------------------------------- Fai · 2011-08-26 07:08 Quote from: Lacak2 on August 26, 2011, 07:27:46 amwhich database component do you use (TSQLQuery with TSQLite3Connection (sqlDB), Zeos, TSqlite3Dataset) ? I am not expor for lazreport, but try use something like: "[formatdatetime('yyyy-mm-dd', [Sqlite3DataSet1."putdate"])]" i use TSQLite3Connection and TSqlite3dataset. I try your function and the result is: 'an error occured during calculation'. But if i use "formatdatetime('yyyy-mm-dd', [Sqlite3DataSet1."putdate"])" (without brackets at the beginning and the end of the text) in the preview only shows "formatdatetime('yyyy-mm-dd', )". i believe there is something wrong with lazreport and sqlite. because if i use dbase (.dbf) i have no problem in showing date. no need to use functions and can use date custom format. this is frustrating..just one small step to finish this project.. ---------------------------------------------------------------------- Lacak2 · 2011-08-26 08:22 I wonder why you mix TSQLite3Connection and TSqlite3dataset These are two different methods of accessing data. Either use only TSqlite3dataset (in this case you do not need TSQLite3connection) or use TSQLite3Connection with TSQLQuery ;-) When you use for example TDBGrid to displaying data, dates are correct ? ---------------------------------------------------------------------- Fai · 2011-08-26 21:55 yes you're right. it has nothing to do with TSqlite3connection. but the problem still the same. however, i changed TSqlite3dataset with TZQuery from zeos, and...yes the date shows up for all the records! it could be bug in tsqlite3dataset..i don't know  but the problem is solved to me. case closed. i haven't tried to show the records in TDBGrid (i use listview in my app). if i have and got the problem i will post in a new thread. btw, thx lacak2 for your attention.