Page 1 of 1

Strftime() Function

Posted: Sun May 08, 2016 10:09 pm
by Not a lot of thought
Currently using YYYY-MM-DD string for date format, but the strftime function when using a modifier isn't returning a value.

"SELECT strftime('%W', 'Week'), Week, Sum(CRED) FROM Temp_Table GROUP BY Week;"
Put revDataFromQuery(tab, return, gDatabaseID, tSQL) into field

I've not been able to figure out what's up.

Re: Strftime() Function

Posted: Tue May 10, 2016 7:15 pm
by AxWald
Hi,
Not a lot of thought wrote:"SELECT strftime('%W', 'Week'), Week, Sum(CRED) FROM Temp_Table GROUP BY Week;"
Have you tried already:
"SELECT strftime('%W', Week) ..." or
"SELECT strftime('%W', Temp_Table.Week) ..."?

The second notation is what I use - "SELECT strftime('%Y,%m,%d,%H,%M,%S,%w', MyTable.MyField) ..." to get the dateItems.

Have fun!