Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Bernie Reiter
Dear all. Sorry! Ashes on my head :-) Last night it was 3.00 in the morning before I got off my screen ... Adding single quotes AND actually using sqlite did it (see below). Txs again for all your help and patience. bernie sqlite> select strftime('%w','2010-03-21'); 0 sqlite> select

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread P Kishor
On Tue, Mar 23, 2010 at 2:58 PM, Bernie Reiter wrote: > 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

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Igmar Palsenberg
On 3/23/10 8:58 PM, Bernie Reiter wrote: > 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

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Bernie Reiter
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

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Jay A. Kreibich
On Tue, Mar 23, 2010 at 07:25:56PM +, Bernie Reiter scratched on the wall: > Sunday, March 21st 2010:SELECT strftime('%w',2010-03-21); => 6 > Monday, March 22nd 2010: SELECT strftime('%w',2010-03-22); => 5 > Tuesday, March 23nd 2010: SELECT strftime('%w',2010-03-23); => 4 Try

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Stephan Wehner
On Tue, Mar 23, 2010 at 12:25 PM, Bernie Reiter wrote: > Dear Dr. Hipp, > SELECT strftime('%w',2010-03-22 22:12:40) ; => SQL error near "22": syntax > error Add quotes: SELECT strftime('%w','2010-03-22 22:12:40'); See the section Examples at

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Nicolas Williams
On Tue, Mar 23, 2010 at 07:25:56PM +, 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.

[sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Bernie Reiter
Dear Dr. Hipp, SQLite is a wonderful tool. Thanks a LOT ! I am working every day with it and love it more and more :-) Only sometimes I am confused. Maybe the community can help or enlighten me. Thanks again bernie 1) My environment: -- [liveu...@localhost ~]$ date Mon Mar 22