Waiting for someone to post a CTE solution along the lines of WITH weekday(dayno,dayname) AS (SELECT (0,'Sun) ....) .. SELECT dayname FROM weekday WHERE dayno = strftime(...).
-----Ursprüngliche Nachricht----- Von: sqlite-users [mailto:[email protected]] Im Auftrag von x Gesendet: Donnerstag, 01. Februar 2018 14:50 An: SQLite mailing list <[email protected]> Betreff: [EXTERNAL] Re: [sqlite] Easiest way to get day of week as a string (not a number)? Don’t think you’ll get it any less ugly than substr('SunMonTueWedThuFriSat',strftime('%w',Date)*3+1,3); without defining your own functions. From: Chris Green<mailto:[email protected]> Sent: 01 February 2018 13:13 To: [email protected]<mailto:[email protected]> Subject: [sqlite] Easiest way to get day of week as a string (not a number)? I want to get Sun, Mon, Tue, Wed etc. from a date, what's the easiest way of doing this in a sqlite select? I guess I can do something (horrible?) with the numeric day of week and substr() but is there not an easier way? -- Chris Green · _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0 May be privileged. May be confidential. Please delete if not the addressee. _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

