Friends
what is the difference between java.util.Date and java.sql.Date?
Please
thanks
Selvaraj
-
java.util.Date and java.sql.Date (1 messages)
- Posted by: Majic Robot
- Posted on: March 19 2001 14:53 EST
Threaded Messages (1)
- java.util.Date and java.sql.Date by Ajith KR on March 22 2005 02:43 EST
-
java.util.Date and java.sql.Date[ Go to top ]
- Posted by: Ajith KR
- Posted on: March 22 2005 02:43 EST
- in response to Majic Robot
SQL date handle transformations of date to string values and string to date values conforming to SQL representations.
SQL date overrides the toString() method and provides a static method( valueOf( String ))
// From java.sql.Date class extending java.util.Date
int i = super.getYear() + 1900;
for 2005 getYears() returnd 105 in util date
int j = super.getMonth() + 1;
The format for all these string manipulations are done accoring to SQL standard which can never be changed by the programmer