Re: [sqlite] DateTime comparison with custom format

2009-08-21 Thread D. Richard Hipp
On Aug 21, 2009, at 7:22 PM, Jean-Christophe Deschamps wrote: > > US "standard" for date is also completely awkward MM/DD/ as well > as > most european (german for you, french for me) formats. That is a "style" or "convention", not a "standard". The standard is defined here: http://en.wi

Re: [sqlite] DateTime comparison with custom format

2009-08-21 Thread Jean-Christophe Deschamps
´¯¯¯ >(btw it's the standard datetime format in germany, not custom-designed >:-P) `--- I see this as a confusion between a storage/computational format and human interface representation. US "standard" for date is also completely awkward MM/DD/ as well as most european (german for you, f

Re: [sqlite] DateTime comparison with custom format

2009-08-21 Thread Simon Slavin
On 21 Aug 2009, at 11:37pm, Igor Tandetnik wrote: > t-master wrote: >> the problem is, this db is created by another program and I don't >> have the access to change the format > > What do you mean, don't have access? Can't you just run an UPDATE > statement once, that changes all the fields to

Re: [sqlite] DateTime comparison with custom format

2009-08-21 Thread Igor Tandetnik
t-master wrote: > the problem is, this db is created by another program and I don't > have the access to change the format What do you mean, don't have access? Can't you just run an UPDATE statement once, that changes all the fields to use a different format? Igor Tandetnik _

Re: [sqlite] DateTime comparison with custom format

2009-08-21 Thread Kit
2009/8/21 t-master : > Hi > I have string in a table representing a DateTime. > The format is 21.08.2009 00:25:00 > And I would like to compare it to "now" > How can I do this? > -- > View this message in context: > http://www.nabble.com/DateTime-comparison-with-custom-format-tp25085040p25085040.h

Re: [sqlite] DateTime comparison with custom format

2009-08-21 Thread t-master
Igor Tandetnik wrote: > > t-master wrote: >> I have string in a table representing a DateTime. >> The format is 21.08.2009 00:25:00 > > I recommend you change the format. Yours is custom-designed to make your > life miserable. > >> And I would like to compare it to "now" > > select case wh

Re: [sqlite] DateTime comparison with custom format

2009-08-21 Thread Igor Tandetnik
t-master wrote: > I have string in a table representing a DateTime. > The format is 21.08.2009 00:25:00 I recommend you change the format. Yours is custom-designed to make your life miserable. > And I would like to compare it to "now" select case when substr(T, 7, 4)||'-'||substr(T, 4, 2)|

Re: [sqlite] DateTime comparison with custom format

2009-08-21 Thread Simon Slavin
On 21 Aug 2009, at 7:25pm, t-master wrote: > I have string in a table representing a DateTime. > The format is 21.08.2009 00:25:00 > And I would like to compare it to "now" > How can I do this? If you need to know whether it's before or after instead of just equal, then you're going to need to