File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
subject: Date format
It's not a secret anymore!