Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2613

Re: java reading csv file and inserting into database gives date value error.

From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.help
Subject Re: java reading csv file and inserting into database gives date value error.
Organization Canadian Mind Products
Message-ID <7ltmk8tt3den363rdqncf9l7602ed2i4jq@4ax.com> (permalink)
References <2d05a26a-ce25-44d3-b9db-7d70cf6fc62b@googlegroups.com>
Date 2013-03-21 14:10 -0700

Show all headers | View raw


On Thu, 21 Mar 2013 01:26:47 -0700 (PDT), twonjee2002@gmail.com wrote,
quoted or indirectly quoted someone who said :

>I am using a java program to read lines from csv and insert them into mysql=
> database.

there are so many different formats for dates.

I like to standardize on ISO format yyyy-mm-dd

Make sure you are feeding your SQL /JDBC dates in the form it wants
and that you have configured your SQL dates to match.

One time a long time ago I got so pissed with incompatible date
formats I stored them in integer days since 1970, which were simple
ints that could be confused by different SQL engines.

-- 
Roedy Green Canadian Mind Products http://mindprod.com
Every method you use to prevent or find bugs leaves a residue of subtler 
bugs against which those methods are ineffectual. 
 ~ Bruce Beizer  Pesticide Paradox

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

java reading csv file and inserting into database gives date value error. twonjee2002@gmail.com - 2013-03-21 01:26 -0700
  Re: java reading csv file and inserting into database gives date value error. Roedy Green <see_website@mindprod.com.invalid> - 2013-03-21 14:10 -0700
  Re: java reading csv file and inserting into database gives date value error. Lew <lewbloch@gmail.com> - 2013-03-21 14:17 -0700

csiph-web