If you declared your date and time (timestamp) column DATETIME it will
be floating point and will store date and time in 8 bytes. Use the FP
bind function. If you make it a REAL instead of DATETIME your code will
be clearer.
Joanne Pham wrote:
Hi All,
I have two question regarding DATETIME column data type:
1 ) Should I store my COLUMN as INTEGER instead of DATETIME. Is it easier if this column type is INTEGER vs DATETIME then
do the conversion in the GUI code to convert from INTEGER TO DATETIME.
2) And if I store as DATETIME then What is the command to bind this column
type as DATETIME.
For the INTEGER the bind command is : sqlite3_bind_int but I don't know if the column is DATETIME
then what is the command to bind this column.
Thanks,
JP
----- Original Message ----
From: P Kishor <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Thursday, December 13, 2007 2:48:26 PM
Subject: Re: [sqlite] create table with datatype = DATE
CREATE TABLE test (.. createData DATETIME DEFAULT CURRENT_TIMESTAMP)
On 12/13/07, Joanne Pham <[EMAIL PROTECTED]> 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]
-----------------------------------------------------------------------------