Re: [sqlite] Date comparison on UTC

2007-08-27 Thread Dennis Cote
Andre du Plessis wrote: select date_modified from table where julianday(date_modified) > julianday(CURRENT_TIMESTAMP) - 1; this seems to work perfectly, for some reason the function can simply convert the text successfully, not sure how it's able to do that, but impressive, Is there anyway to

Re: [sqlite] Date comparison on UTC

2007-08-27 Thread John Stanton
Sent: 27 August 2007 11:39 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Date comparison on UTC If you use the Sqlite floating point number format (function julianday will do the conversion) you can use functions to compare days and dates. Andre du Plessis wrote: I have a UTC date stored

RE: [sqlite] Date comparison on UTC

2007-08-27 Thread Andre du Plessis
atestamp to the beginning of the day, or maybe do you know if there is a list of built-in date functions somewhere? Thanks. -Original Message- From: John Stanton [mailto:[EMAIL PROTECTED] Sent: 27 August 2007 11:39 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Date comparison on UTC

Re: [sqlite] Date comparison on UTC

2007-08-27 Thread John Stanton
If you use the Sqlite floating point number format (function julianday will do the conversion) you can use functions to compare days and dates. Andre du Plessis wrote: I have a UTC date stored in text column in this format: 2007-08-27 08:58:16.601000 I want to do some selects for all

Re: [sqlite] Date Comparison

2005-05-25 Thread victor...
Hi! My date field is integer. I record the value returned by function time() (time.h). When i need to do some comparison, i use a function that i created in sqlite for use in my sql statements. This function works like strftime. I pass the time and the format (like "%m-%d-%y") and it returns a

RE: [sqlite] Date Comparison

2005-05-25 Thread John Buck
: Tuesday, May 24, 2005 3:51 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Date Comparison John Buck wrote: >If I have a table with a "date" column type. > >Is this valid in SqLite?? > >Select * from MYTABLE where my_date_field > '2005-05-01'; > If y

Re: [sqlite] Date Comparison

2005-05-25 Thread Paolo Vernazza
John Buck wrote: If I have a table with a "date" column type. Is this valid in SqLite?? Select * from MYTABLE where my_date_field > '2005-05-01'; If you saved the data in my_data_field as -mm-dd, the, yes, your query is valid. Paolo

Re: [sqlite] Date Comparison

2005-05-24 Thread Kurt Welgehausen
> Already did. > It doesn't talk about date comparison. Dates are stored in SQLite as strings or numbers (your choice). Comparisons of dates are just comparisons of strings or numbers. There is no Date type. Regards

RE: [sqlite] Date Comparison

2005-05-24 Thread John Buck
Already did. It doesn't talk about date comparison. -Original Message- From: Jay Sprenkle [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 24, 2005 2:21 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Date Comparison On 5/24/05, John Buck <[EMAIL PROTECTED]> wrote: &g

Re: [sqlite] Date Comparison

2005-05-24 Thread Jay Sprenkle
On 5/24/05, John Buck <[EMAIL PROTECTED]> wrote: > If I have a table with a "date" column type. > > Is this valid in SqLite?? > > Select * from MYTABLE where my_date_field > '2005-05-01'; please read the docs. http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions