This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Date datatype in Java" Watch "Date datatype in Java" New topic
Author

Date datatype in Java

Rida Abrahams
Greenhorn

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

Joined: Jul 08, 2003
Posts: 24168
    
  30

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
Greenhorn

Joined: Jan 25, 2004
Posts: 23
Thanks for helping me out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date datatype in Java
 
Similar Threads
Converting Date between Java and DB
Difference between sql.Date and util.Date
Saving system date
Java date to MySQL date conversion
Conversion of string to date