• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBC SQL server date format problem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in my application i am using JDBC ODBC bridge to connect to the SQL server database.its a JSP appication.
when i insert date to database it gets inserted in the format of mm/dd/yy but when i display it in the next page through resultset using getString method it displayes in the format of yy/mm/dd.
is there any method by which i can convert date in the format of mm/dd/yy.
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sanjay vishwas:
in my application i am using JDBC ODBC bridge to connect to the SQL server database.its a JSP appication.
when i insert date to database it gets inserted in the format of mm/dd/yy but when i display it in the next page through resultset using getString method it displayes in the format of yy/mm/dd.
is there any method by which i can convert date in the format of mm/dd/yy.



Use DateFormat Class to change the format. Then display it in Screen.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic