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 datatype in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Date datatype in Java" Watch "Date datatype in Java" New topic

Date datatype in Java

Rida Abrahams

Joined: Jan 25, 2004
Posts: 23
Which datatype do I use to store a date in Java? Is there a date datatype in Java to begin with.
Fathima Khan.
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

There are several. The class java.util.Calendar is a general date class; java.util.Date is a simple one. java.sql.Date is for use with the JDBC database API.

[Jess in Action][AskingGoodQuestions]
Rida Abrahams

Joined: Jan 25, 2004
Posts: 23
Thanks for helping me out.
I agree. Here's the link:
subject: Date datatype in Java
It's not a secret anymore!