Hi All,
Should I create the column in DATETIME or the INTEGER to store the time.
DATETIME has the value of GMT time. So I store this value as INTEGER then I 
need to convert datetime format but it will be use less space if I use the 
INTEGER. Please give me an advice.
Thanks
Joanne



----- Original Message ----
From: John Stanton <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Thursday, December 13, 2007 3:05:52 PM
Subject: Re: [sqlite] create table with datatype = DATE

The type DATE is a declared type, not an actual type and has no effect u 
nless your code specifically picks it out as a declared type.

To do what you want use a trigger on insert and update the date field 
with datetime('now');

Joanne Pham wrote:
> Hi All,
> I create the table as :
>    create table test (name varchar(30), createDate DATE default 
> DATETIME('NOW'));
> but I got the error message. I want to have the default as now if it is not 
> specify.
> Thanks in advance,
> Joanne
> 
> 
>      
> ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page. 
> http://www.yahoo.com/r/hs


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

Reply via email to