Nico, thanks for your quick reply. I have copied the function strftime('%Y-%m-%d', ...) directly the sqlite documentation and substituted the ... with my date string. Unfortunately, your advice doesn't seem to convince my Linux box, neither with a straight single quote nor with a "backwards leaning" single quote
[liveu...@localhost ~]$ SELECT strftime('%w','2010-03-21'); bash: syntax error near unexpected token `(' [liveu...@localhost ~]$ SELECT strftime('%w',`2010-03-21`); bash: syntax error near unexpected token `(' Txs bernue ----- Original Message ---- From: Nicolas Williams <nicolas.willi...@sun.com> To: Bernie Reiter <bernie_on_the_road_ag...@yahoo.co.uk> Cc: sqlite-users@sqlite.org Sent: Tue, 23 March, 2010 20:29:28 Subject: Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ? On Tue, Mar 23, 2010 at 07:25:56PM +0000, Bernie Reiter wrote: > I am checking this for Sunday, March 21st 2010, Monday, 22nd March 2010 and > Tuesday, 23nd March 2010: > > Sunday, March 21st 2010: SELECT strftime('%w',2010-03-21); => 6 You need single quotes around the date value. 2010-03-21 == 2010 + -03 + -21 -- surely not what you intended. Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users