I am trying to get a figure on my year to date sales. I am using the statement below but it gives me a null value.
I am calculating my date with
Do I need to format it differently? Or start all over?
B4X:
Dim mtdsales As String
mtdsales = SQL1.ExecQuerySingleResult("SELECT sum(total) FROM invoice WHERE strftime('%Y', date) = 2012")
I am calculating my date with
B4X:
DateTime.DateFormat = "MM/dd/yyyy"
today = DateTime.Date(DateTime.now)
Do I need to format it differently? Or start all over?
Last edited: