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.

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-in-01.newsfeed.easynews.com!easynews!core-easynews-01!easynews.com!en-nntp-16.dc1.easynews.com.POSTED!not-for-mail
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
Reply-To Roedy Green <see_website@mindprod.com.invalid>
Message-ID <7ltmk8tt3den363rdqncf9l7602ed2i4jq@4ax.com> (permalink)
References <2d05a26a-ce25-44d3-b9db-7d70cf6fc62b@googlegroups.com>
User-Agent ForteAgent/7.00.32.1200
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Lines 22
X-Complaints-To abuse@easynews.com
X-Complaints-Info Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date Thu, 21 Mar 2013 14:10:12 -0700
X-Received-Bytes 1744
Xref csiph.com comp.lang.java.help:2613

Show key headers only | 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