Hey krian,
Find solution in attached java program.
-Naveen
Adimulam Kiran Kumar <friendz_kiran@yahoo.com> wrote:
Adimulam Kiran Kumar <friendz_kiran@
Hi Sir,I am not able to convert java.sql.Date to java.util.Date.The date format i am getting from sql server is 2005-02-02 00:00:00.0. And i am getting this date from the sql server using Hibernate and not JDBC. If it would have using JDBC i would have got it using rs.getDate(col). Please help me in this issue.This is what i am trying...1) SimpleDateFormat sdf=new SimpleDateFormat("MM-dd-yyyy" ); 2) date=new Date((String)row[12]); //I am getting date in row[12] as 2005-02-02 00:00:00.0
3) System.out.println(sdf.format( date)); I am getting error on line 2,due to some parsing problems with the given date arguement.Thanks,Kiran
______________________________________________________________________________________
"Though we cannot rewrite the past, we should write a better future"
M Naveen Kumar Reddy
+1 248-227-2293 (Edison, NJ)
+1 248-227-2293 (Edison, NJ)
Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
SPONSORED LINKS
.
__,_._,___
No comments:
Post a Comment