Strftime() Function

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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: 578
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!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

Post Reply

Return to “Databases”