> create table each_transaction(datetime int);

> insert into each_transaction values( datetime('%s', 'now'));

Perhaps you should say

  insert into each_transaction values( strftime('%s', 'now'));

?

http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions

e
  
> this is how I create table and insert the
> strftime('%s', 'now'). But when I did query with
> sql3_plus. 

> sqlite3::reader reader=con.executereader("select *
> from each_transaction;");
> while(reader.read())
> {cout << reader.getcolname(0) << ": " <<
> reader.getstring(0) << endl;  }


> I get output like this:

> datetime: á "     <----- invalid 


> Any idea?  coz If I change to
> datetime('now','localtime');
> everything is ok. I only cannot use strftime('%s',
> 'now') for "insert" statement.

> I tried out the pre-compiled command-prompt sqlite but
> doesn't faced with this problem. The sql_lite that i'm
> using to do the above test was static lib compiled by
> me using dev-cpp. I even tried out linking directly
> with .dll but the result still the same, unexpected
> output. 

> thakn you for reading and clarifying my mistake.





                
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - Helps protect you from nasty viruses. 
> http://promotions.yahoo.com/new_mail

Reply via email to