Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Inserting Dates into SQLite

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This code snippet will enter a bunch of messed up numbers.
When I use timestamp as its default, it works just fine
Speaking of timestamp in sqlite, i also have a problem, When I put a CURRENT_TIMESTAMP field in a table, the timezone is not right
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would be much better to UseOneThreadPerQuestion. I'd suggest to edit your current post and move the second question to another thread.

Regarding the problematic insert: can you log the value of followupDueDate using System.out.println or your logging framework so that we can see what exactly are you trying to insert, and also show us what the inserted record looks like? "Messed up numbers" is quite a vague term. Also, is it only the date what is messed up, or other columns too?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!