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

  • SEARCH
  • Home
  • 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 7024343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:49:40+00:00 2026-05-27T23:49:40+00:00

I am using H2 DB in my Java application. I want to load a

  • 0

I am using H2 DB in my Java application. I want to load a .csv file to a table. My .csv file contains a timestamp in format 07/16/2011 02:43:43 but the default timestamp format of H2 DB is 2005-12-31 23:59:59

so when I am using CSVREAD to load that .csv file to the DB, I am getting the following exception:

org.h2.jdbc.JdbcSQLException: Cannot parse "TIMESTAMP" constant "07/16/2011 02:43:43"; SQL statement:
-- row #2 ('CIRCLE', 'MSISDN', 'PORT_IN_DATE', 'OPERATOR', 'PRODUCT_TYPE', 'PORT_ID') [22007-163]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
at org.h2.message.DbException.get(DbException.java:158)
at org.h2.value.ValueTimestamp.parse(ValueTimestamp.java:87)
at org.h2.value.Value.convertTo(Value.java:819)
at org.h2.table.Column.convert(Column.java:155)
at org.h2.command.dml.Insert.addRow(Insert.java:153)
at org.h2.command.dml.Select.queryFlat(Select.java:524)
  • 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-27T23:49:41+00:00Added an answer on May 27, 2026 at 11:49 pm
    select convert(parseDateTime(DOB,'yyyy/MM/dd hh:mm:ss'),timestamp) as NEWNAME
    from CSVREAD('file.csv')
    

    where file.csv has a column labelled DOB

    And to insert into your table:

    insert into YOURTABLE 
        (
         select convert(parseDateTime(DOB,'yyyy/MM/dd hh:mm:ss'), timestamp)
         from CSVREAD('file.csv')
        )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using H2 DB in my java application. I want to load a
I am scraping data from web site using my java application and want to
How to get money from users phone using Java application? So I want to
I have a java-application using JDBC for database interaction. I want to do a
I want to create a Java application bundle for Mac without using Mac. According
I want to convert an java application to applet, but I an having problems
Im developing desktop java application using maven. I got a *.properties file that I
I have spring application and using property file want to read the values from
In Java, you can load all kinds of resources using the same API but
I'm creating a sticky note application using Java. What I want to do: I

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.