Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7600653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:57:49+00:00 2026-05-30T22:57:49+00:00

A date field in my entity class is defined as below: @Temporal(TemporalType.TIMESTAMP) @Column(name =

  • 0

A date field in my entity class is defined as below:

@Temporal(TemporalType.TIMESTAMP)
@Column(name = "LAST_EXECUTED")
private Date lastExecuted = new Date();

However, when it is persisted to a SQLite3 database through JPA, the database value is always ‘1899-12-30’. Do you have any ideas why?

In the database, the field is defined as DATETIME.

I’ve tried using both SqliteJDBC and Xerial SQLite JDBC.

Update: After turning on SQL debugging in EclipseLink JPA, and turning off parameter binding, it looks like dates are inserted as following:

insert into run (last_executed) values ('{ts ''2012-02-17 10:34:58.013''}');

which, if inserted, manually in SQLite, gives the date ‘1899-12-30’.

Of course, any workarounds would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T22:57:50+00:00Added an answer on May 30, 2026 at 10:57 pm

    The date looks correct in the insert, so seems to be some kind of SQLite issue. You should normally use parameter binding, it seems SQLite does allow Timestamp to be bound, or ignores the DATE portion. What if you use TemporalType.DATE?

    Perhaps try through raw JDBC to see exactly what your JDBC drivers issue are?

    For the printed syntax if not using parameter binding, you can customize this by creating your own DatabasePlatform subclass. The syntax you printed is the standard JDBC timestamp syntax.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My entity class: @Entity @Table(name = user) public class User implements Serializable { private
I need to sort on a date-field type, which name is mod_date. It works
I have an entity called Photo. A photo has a date field and I
I have these two class(table) @Entity @Table(name = course) public class Course { @Id
I am trying to get a Date type field from the entity and I
Here is the BlogPost model : @Entity @Table(name = blog_posts) public class BlogPost extends
I have a custom UserType which stores a date/time value in a TIMESTAMP field
I have Database with date field. I see the time like: 1900-01-01 13:38:00.000 How
im trying to formatting the date field 'created_at' from Twitter API response with Zend_Date.
I have a record set that includes a date field, and want to determine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.