Re: [sqlite] Re: dates and times in sqlite

2007-09-20 Thread Mark Wyszomierski
Oh I forgot to put quotes around the result, thanks Igor,

Mark

On 9/20/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
> Mark Wyszomierski <[EMAIL PROTECTED]>
> wrote:
> > I've made a text field called "timestamp" which has dates in the form:
> >
> >-MM-DD HH:MM:SS
> >
> > I want to test if the day portion is a Tuesday for example -
> > something like:
> >
> >SELECT * FROM my_table WHERE DAY(timestamp) = TUESDAY
>
> select * from my_table
> where strftime('%w', timestamp) = '2';
>
> Igor Tandetnik
>
>
> -
> To unsubscribe, send email to [EMAIL PROTECTED]
> -
>
>

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Re: dates and times in sqlite

2007-09-20 Thread Igor Tandetnik

Mark Wyszomierski <[EMAIL PROTECTED]>
wrote:

I've made a text field called "timestamp" which has dates in the form:

   -MM-DD HH:MM:SS

I want to test if the day portion is a Tuesday for example -
something like:

   SELECT * FROM my_table WHERE DAY(timestamp) = TUESDAY


select * from my_table
where strftime('%w', timestamp) = '2';

Igor Tandetnik 



-
To unsubscribe, send email to [EMAIL PROTECTED]
-