Is 'strftime' function supported? I'm trying to get from the database the SUM of values for a given month (january 2012).
I get the error: "NullPointerException" at this line:
B4X:
Dim SQL1 As SQL
SQL1.Initialize(File.DirDefaultExternal, "Database.db", True)
Dim sResult As Float
Dim sSQLQuery As String
sSQLQuery = "SELECT SUM(Value) FROM Invoices WHERE ClientID=1 AND strftime('%m', InvoiceDateTime)='01' AND strftime('%Y', InvoiceDateTime)='2012'"
sResult = SQL1.ExecQuerySingleResult(sSQLQuery)
If sResult = Null Then
Return 0
Else
Return sResult
End If
I get the error: "NullPointerException" at this line:
B4X:
sResult = Main.SQL1.ExecQuerySingleResult(sSQLQuery)
Last edited: