what i trying to say is, i cant use strftime('%s', 'now') but also to use other function like datetime('now') . This is because the output of select will be invalid. if i use datetime('now') . the output is 2005-02-01 15:44:23 . How does the "select" statement should look like if i want it to show only records before 2005-01-01 0:0:00 ? i believe that is impossible if I unable to use strftime('%s', 'now') .
please comment. thank you. --- Jay <[EMAIL PROTECTED]> wrote: > > Does this fix it? > insert into each_transaction(datetime) > values(datetime('now')); > > > --- teoh <[EMAIL PROTECTED]> wrote: > > > > > create table each_transaction(datetime int); > > > > insert into each_transaction values( > datetime('%s', > > 'now')); > > > > 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 > > > > > ===== > > --------------------------------- > > "Lord Tarlington gazed upon the crazed Egyptian > hieroglyphics on the walls of the ancient tomb of > the petrified pharaoh, he vowed there would be no > curse on him like on that other Lord, unless you > count his marriage to Lady Tarlington who, when the > lost treasure was found, will be dumped faster than > that basket in the bulrushes." > Melissa Rhodes > --------------------------------- > > The Castles of Dereth Calendar: a tour of the art > and architecture of Asheron's Call > http://www.lulu.com/content/77264 > > > > __________________________________ > Do you Yahoo!? > Meet the all-new My Yahoo! - Try it today! > http://my.yahoo.com > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com