Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-04 Thread Григорий Григоренко
Fri, 02 Nov 2012 15:32:44 +0100 от Clemens Ladisch clem...@ladisch.de: Igor Tandetnik wrote: SQLite does in fact accept CURRENT_TIMESTAMP in DEFAULT clause. http://sqlite.org/lang_createtable.html#tablecoldef SQLite does in fact accept CURRENT_TIMESTAMP anywhere:

Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-04 Thread Григорий Григоренко
Fri, 2 Nov 2012 10:25:18 -0400 от Richard Hipp d...@sqlite.org: On Fri, Nov 2, 2012 at 10:18 AM, Simon Davies simon.james.dav...@gmail.com wrote: datetime() will give current date and time likewise date(), time() etc If I read the original post correctly, I think the OP is requesting a

Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-04 Thread Григорий Григоренко
: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Григорий Григоренко [grigore...@mail.ru] Sent: Friday, November 02, 2012 8:08 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite]SUGGESTION: now as alias for strftime('%s','now') Thu, 1 Nov 2012 19

Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-04 Thread Baruch Burstein
[sqlite-users-boun...@sqlite.org] on behalf of Григорий Григоренко [grigore...@mail.ru] Sent: Friday, November 02, 2012 8:08 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite]SUGGESTION: now as alias for strftime('%s','now') Thu, 1 Nov 2012 19:57:42 + от Simon

Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-04 Thread Roger Andersson
-Ursprungligt meddelande- From: Baruch Burstein Sent: Sunday, November 04, 2012 10:43 AM To: Григорий Григоренко ; General Discussion of SQLite Database Subject: Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now') CURRENT_TIMESTAMP returns -MM-DD HH:MM:SS, not a unix

Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-04 Thread Black, Michael (IS)
...@mail.ru] Sent: Sunday, November 04, 2012 1:34 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite]SUGGESTION: now as alias for strftime('%s','now') Fri, 2 Nov 2012 14:11:26 + от Black, Michael (IS) michael.bla...@ngc.com: CREATE TABLE t(id,time); INSERT INTO t VALUES(1

Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-02 Thread Григорий Григоренко
Thu, 1 Nov 2012 19:57:42 + от Simon Slavin slav...@bigfraud.org: On 1 Nov 2012, at 7:55pm, Григорий Григоренко grigore...@mail.ru wrote: it is a common practice to store datetime values as UNIX time UTC. Maybe, Sqlite should have some shortcut for evaluating current moment? Please

Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-02 Thread Igor Tandetnik
Григорий Григоренко grigore...@mail.ru wrote: Compare: MS SQL: CURRENT_TIMESTAMP SQLite does in fact accept CURRENT_TIMESTAMP in DEFAULT clause. Does this satisfy your requirements? http://sqlite.org/lang_createtable.html#tablecoldef -- Igor Tandetnik

Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-02 Thread Black, Michael (IS)
-users-boun...@sqlite.org] on behalf of Григорий Григоренко [grigore...@mail.ru] Sent: Friday, November 02, 2012 8:08 AM To: General Discussion of SQLite Database Subject: EXT :Re: [sqlite]SUGGESTION: now as alias for strftime('%s','now') Thu, 1 Nov 2012 19:57:42 + от Simon Slavin slav

Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-02 Thread Simon Davies
On 2 November 2012 13:08, Григорий Григоренко grigore...@mail.ru wrote: Thu, 1 Nov 2012 19:57:42 + от Simon Slavin slav...@bigfraud.org: Please read http://www.sqlite.org/lang_datefunc.html Surely, I did) Don't get me wrong - my point is not that Sqlite is lacking functions that

Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-02 Thread Clemens Ladisch
Igor Tandetnik wrote: SQLite does in fact accept CURRENT_TIMESTAMP in DEFAULT clause. http://sqlite.org/lang_createtable.html#tablecoldef SQLite does in fact accept CURRENT_TIMESTAMP anywhere: http://www.sqlite.org/lang_expr.html Regards, Clemens

[sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-01 Thread Григорий Григоренко
Hello, it is a common practice to store datetime values as UNIX time UTC.  Maybe, Sqlite should have some shortcut for evaluating current moment? Some alias for strftime('%s','now') ? Like, now or unixnow:   created_at   DEFAULT  (now())     vs     created_at    DEFAULT   (strftime('%s','now'))

Re: [sqlite] SUGGESTION: now as alias for strftime('%s','now')

2012-11-01 Thread Simon Slavin
On 1 Nov 2012, at 7:55pm, Григорий Григоренко grigore...@mail.ru wrote: it is a common practice to store datetime values as UNIX time UTC. Maybe, Sqlite should have some shortcut for evaluating current moment? Please read http://www.sqlite.org/lang_datefunc.html Simon.