Re: [sqlite] support of %y in strftime()

2012-03-15 Thread LacaK
Hi *, month ago I wrote question about possibility to add support of %y (2 digit year) to strftime() function. Patch is very simple and I hope, that will be useful for many users. Patch by Alexey is here: http://sqlite.mobigroup.ru/wiki?name=2-digit+year+patch (although I think, that it can be

Re: [sqlite] support of %y in strftime()

2012-02-05 Thread LacaK
Looking at patch I do not understand, why we add n += 4; in case of 'y' ? I would do: case 'W': + case 'y': n++; ... +case 'y': { + sqlite3_snprintf(3,[j],"%02d",x.Y % 100); j+=2; + break; +} > See "2-digit year patch" here:

Re: [sqlite] support of %y in strftime()

2012-02-05 Thread LacaK
See "2-digit year patch" here: http://sqlite.mobigroup.ru/wiki?name=patches I did write this becouse 2-digit year number is needed very often for me. Thanks Alexey, As this patch is easy and adds only few lines of source code (but as I think very useful), can it be accepted (merged) into

Re: [sqlite] support of %y in strftime()

2012-02-03 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/02/12 06:11, Don V Nielsen wrote: > having another disaster like Y2k. Oh yeah, that amounted to big fat > thud. There were lots of happenings you didn't hear about. For example at my employer of the time we had a 16 bit client access app fail

Re: [sqlite] support of %y in strftime()

2012-02-03 Thread Alexey Pechnikov
See "2-digit year patch" here: http://sqlite.mobigroup.ru/wiki?name=patches I did write this becouse 2-digit year number is needed very often for me. 2012/2/3 LacaK : > Hi *, > there is date-time formating function strftime(), which supports some (not > all) string formating

Re: [sqlite] support of %y in strftime()

2012-02-03 Thread Simon Slavin
On 3 Feb 2012, at 2:18pm, Richard Hipp wrote: > On Fri, Feb 3, 2012 at 9:11 AM, Don V Nielsen wrote: > >> But if we don't start worrying about the year 10,000 now, then we'll end of >> having another disaster like Y2k. > > The date and time functions in SQLite break

Re: [sqlite] support of %y in strftime()

2012-02-03 Thread Richard Hipp
On Fri, Feb 3, 2012 at 9:11 AM, Don V Nielsen wrote: > But if we don't start worrying about the year 10,000 now, then we'll end of > having another disaster like Y2k. > The date and time functions in SQLite break down on 5352-11-01 10:52:47, which is thousands of years

Re: [sqlite] support of %y in strftime()

2012-02-03 Thread Don V Nielsen
gt; Advanced GEOINT Solutions Operating Unit > > Northrop Grumman Information Systems > > > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] > on behalf of LacaK [la...@zoznam.sk] > Sent: Friday, February 03, 2012 3:37

Re: [sqlite] support of %y in strftime()

2012-02-03 Thread Black, Michael (IS)
n Information Systems From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of LacaK [la...@zoznam.sk] Sent: Friday, February 03, 2012 3:37 AM To: General Discussion of SQLite Database Subject: EXT :[sqlite] support of %y in s

[sqlite] support of %y in strftime()

2012-02-03 Thread LacaK
Hi *, there is date-time formating function strftime(), which supports some (not all) string formating parameters (like %d, %m, %Y) There is %Y for 4-digit year. Is possible add also %y for 2-digit year ? (like in strftime() in standard C library) If it is not a big problem (I hope, that