on ‎2007 Jun 19 2:52 AM
Hi All,
What is the difference between java.sql.date and java.util.date and which is more preferable to use .How to convert date from one form to another .
Thanks.
Request clarification before answering.
Hi
And also see This how to change date from one form to other..
How to change a date value from "java.util.Date" to
> "java.sql.Date"?
<a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html">java.util.Date</a> date = // date
<a href="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Date.html">java.sql.Date</a> sqlDate = new <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Date.html#Date(long)">java.sql.Date(</a> date.<a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html#getTime()">getTime()</a> <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Date.html#Date(long)">)</a>
Urs GS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.