Article View: borland.public.jbuilder.java.language
Article #7338How do you convert an integer to a string?
From: swett
Date: Wed, 27 Jun 2001 15:47
Date: Wed, 27 Jun 2001 15:47
25 lines
1388 bytes
1388 bytes
I have a database table that has dates stored as numeric fields, such as:
20010625
20010626
20010627
etc. (YYYYMMDD format)
During/after reading these values, I'd like to break these into 3 integer
fields:
2001 (year)
06 (month)
25 (day)
How can that be done?
I can read the field in from the result set with:
resultset.getString("mycol");
and then break it down into 3 string objects for year, month, and day; but
how do I get these values into integer format?
Thanks.
Technical Details
Message-ID:
<3b3a02b6_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!193.190.198.17!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,55667c966d6ea9fa,start X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-27 09:09:52 PST Reply-To: <swett@bcswebsite.com> From: <swett@starband.com> Newsgroups: borland.public.jbuilder.java.language Subject: How do you convert an integer to a string? Date: Wed, 27 Jun 2001 11:47:48 -0400 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 148.71.34.6 Message-ID: <3b3a02b6_2@dnews> X-Trace: dnews 993657526 148.71.34.6 (27 Jun 2001 08:58:46 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!193.190.198.17!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews