Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Java in General and the fly likes Date format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Date format" Watch "Date format" New topic

Date format

Milind Deodhar
Ranch Hand

Joined: Dec 06, 2000
Posts: 32
I have a frame which has a textbox , the values of which should be date and should update a date in a MS Access Database.
The date in the Access database is of Date/Time type with Short Date format.
How should I convert the string to date format which can be inserted in the database.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Create a java.util.Date object (may have to use Calendar) and then convert that to a java.sql.Date.

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
I agree. Here's the link:
subject: Date format
It's not a secret anymore!