TomDuncan Active Member Licensed User Longtime User Apr 4, 2013 #1 Hi all, I am using DBUtils to fill a listview DateTime.DateFormat = "dd/MM/yyyy" 'set for Display S= "SELECT [InvNbr] || ' ' || [DspName] || ' ' || InvDate FROM Invoice" Dim PatInv As List DBUtils.ExecuteListView(SQL1,S,Null,0,lvInv,False) lvInv.SingleLineLayout.Label.TextSize=14 However the date comes out as "yyyy-MM-dd" How can I change this? Tom :sign0104:
Hi all, I am using DBUtils to fill a listview DateTime.DateFormat = "dd/MM/yyyy" 'set for Display S= "SELECT [InvNbr] || ' ' || [DspName] || ' ' || InvDate FROM Invoice" Dim PatInv As List DBUtils.ExecuteListView(SQL1,S,Null,0,lvInv,False) lvInv.SingleLineLayout.Label.TextSize=14 However the date comes out as "yyyy-MM-dd" How can I change this? Tom :sign0104:
Erel B4X founder Staff member Licensed User Longtime User Apr 4, 2013 #2 DateTime.DateFormat doesn't have any effect on the values retrieved from the database. The date is saved in the database as a regular string. You should use SQL date & time functions: B4X: "SELECT ... || strftime('%d/%m/%Y', InvDate) FROM ..." Upvote 0
DateTime.DateFormat doesn't have any effect on the values retrieved from the database. The date is saved in the database as a regular string. You should use SQL date & time functions: B4X: "SELECT ... || strftime('%d/%m/%Y', InvDate) FROM ..."