Strftime() Function

Creating desktop or client-server database solutions?

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
Not a lot of thought
Posts: 77
Joined: Thu May 21, 2015 2:41 am

Strftime() Function

Post by Not a lot of thought » Sun May 08, 2016 10:09 pm

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.

AxWald
Posts: 362
Joined: Thu Mar 06, 2014 2:57 pm

Re: Strftime() Function

Post by AxWald » Tue May 10, 2016 7:15 pm

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!
Livecode programming until the cat hits the fan ...

Post Reply

Return to “Databases”