Re: [sqlite] date field with default current date

2011-05-23 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/23/2011 08:46 AM, Fabio Spadaro wrote: > Hi When you quote other messages, only quote the relevant pieces that you are replying to. Several hundred lines is not appropriate. > What is the difference between "sqlite3.version" (typed on command

Re: [sqlite] date field with default current date

2011-05-23 Thread Jean-Christophe Deschamps
> I resolved with: >CREATE TRIGGER insert_nameTable after insert on >name_tabl begin >update set ww = datetime('now','localtime') >where rowid = new.rowid; end" You don't have to fire a trigger for such default: CREATE TABLE "test" ( "mydate" CHAR DEFAULT

Re: [sqlite] date field with default current date

2011-05-23 Thread Fabio Spadaro
gt; wrote: > >>>> >> > Hi. > >>>> >> > > >>>> >> > 2011/4/21 Black, Michael (IS) <michael.bla...@ngc.com> > >>>> >> > > >>>> >> >> create table t (d default CURRENT_DATE,i nu

Re: [sqlite] date field with default current date

2011-04-22 Thread Pavel Ivanov
;> >> > >>>> >> > 2011/4/21 Black, Michael (IS) <michael.bla...@ngc.com> >>>> >> > >>>> >> >> create table t (d default CURRENT_DATE,i number); >>>> >> >> insert into t (i) values(1); >>>> &g

Re: [sqlite] date field with default current date

2011-04-22 Thread Marian Cascaval
From: Fabio Spadaro <fabiolinos...@gmail.com> To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Sent: Fri, April 22, 2011 12:46:53 PM Subject: Re: [sqlite] date field with default current date >In my system is set up with 1

Re: [sqlite] date field with default current date

2011-04-22 Thread Fabio Spadaro
>> 2011-04-21|1 >>> >> >> >>> >> >> >>> >> >> >>> >> >> Use CURRENT_TIME if you want hours/minutes too. >>> >> >> >>> >> >> >>> >> >> >>

Re: [sqlite] date field with default current date

2011-04-22 Thread Fabio Spadaro
gt;> select * from t; >> >> >> 2011-04-21|1 >> >> >> >> >> >> >> >> >> >> >> >> Use CURRENT_TIME if you want hours/minutes too. >> >> >> >> >> >> >> >>

Re: [sqlite] date field with default current date

2011-04-22 Thread Fabio Spadaro
gt; >> >> > >> >> > >> >> Michael D. Black > >> >> > >> >> Senior Scientist > >> >> > >> >> NG Information Systems > >> >> > >> >> Advanced Analytics Directorate >

Re: [sqlite] date field with default current date

2011-04-21 Thread Pavel Ivanov
utes too. >> >> >> >> >> >> >> >> Michael D. Black >> >> >> >> Senior Scientist >> >> >> >> NG Information Systems >> >> >> >> Advanced Analytics Directorate >> >> >

Re: [sqlite] date field with default current date

2011-04-21 Thread Fabio Spadaro
;> > >> Advanced Analytics Directorate > >> > >> > >> > >> ____________ > >> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] > on > >> behalf of Fabio Spadaro [fabiolinos...@gmail.com] >

Re: [sqlite] date field with default current date

2011-04-21 Thread Pavel Ivanov
gt; Michael D. Black >> >> Senior Scientist >> >> NG Information Systems >> >> Advanced Analytics Directorate >> >> >> >> >> From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on >> behal

Re: [sqlite] date field with default current date

2011-04-21 Thread Fabio Spadaro
2011/4/21 Mihai Militaru > On Thu, 21 Apr 2011 15:17:00 +0200 > Fabio Spadaro wrote: > > > Does not work on python with sqlite3 module > > Try using the date and time functions, 'date' or 'datetime' in your case: > INSERT INTO table(..., date)

Re: [sqlite] date field with default current date

2011-04-21 Thread Mihai Militaru
On Thu, 21 Apr 2011 15:17:00 +0200 Fabio Spadaro wrote: > Does not work on python with sqlite3 module Try using the date and time functions, 'date' or 'datetime' in your case: INSERT INTO table(..., date) VALUES(..., datetime('now'));

Re: [sqlite] date field with default current date

2011-04-21 Thread Fabio Spadaro
ent: Thursday, April 21, 2011 5:37 AM > To: General Discussion of SQLite Database > Subject: EXT :[sqlite] date field with default current date > > Hi. > I'm working with python and sqlite3 and i ask how to create a table with a > date > field wih de

Re: [sqlite] date field with default current date

2011-04-21 Thread Black, Michael (IS)
: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Fabio Spadaro [fabiolinos...@gmail.com] Sent: Thursday, April 21, 2011 5:37 AM To: General Discussion of SQLite Database Subject: EXT :[sqlite] date field with default current date Hi. I'm working with python and sqlite3

[sqlite] date field with default current date

2011-04-21 Thread Fabio Spadaro
Hi. I'm working with python and sqlite3 and i ask how to create a table with a date field wih defaults current date. Thanks. -- Fabio Spadaro www.fabiospadaro.com ___ sqlite-users mailing list sqlite-users@sqlite.org