• 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:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

how to update one column of my table?

 
Ranch Hand
Posts: 291
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear friends,
I want to read my table and write it again with updated data like(Wed Jan 19 16:26:37 PST 2001 and change it to 1/19/2001)so how can I update this column data through my servlet?
Any advice?
Many thanks,
Elahe
 
Elahe Shafie
Ranch Hand
Posts: 291
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
or mybe it is clear to ask this way that how can I read date like this format from database:
Wed Feb 19 16:26:37 PST 2001
Wed Jan 02 12:22:40 PST 2002
and write it like:
2/19/2001
1/02/2002
I need to update all data in date column.
I hope it is clear this time...
Many Thanks,
Elahe
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should read it out of the database as a Date, and then format it for the user:

to update the database, get the formatted String date, parse it into a Date object, write the date object to the database:

Jamie
 
We can walk to school together. And we can both read this tiny ad:
The new gardening playing cards kickstarter is now live!
https://www.kickstarter.com/projects/paulwheaton/garden-cards
reply
    Bookmark Topic Watch Topic
  • New Topic