File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java 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 » Beginning Java
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.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
There are some methods you can use in the java.text.DateFormat class.


So much trouble in the world -- Bob Marley
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Use SimpleDateFormat with the pattern using "MM/dd/yy"
SimpleDateFormat myDate = new SimpleDateFormat("MM/dd/yy");

"JavaRanch, where the deer and the Certified play" - David O'Meara
I agree. Here's the link:
subject: Date format
jQuery in Action, 3rd edition