Conversion from timestamp to date

Hi All,Does anyone know how to convert a timestamp value to a date?Any help is appreciated
[111 byte] By [vishala] at [2007-10-2 11:00:56]
# 1
java.text.DateFormat
aconst_nulla at 2007-7-13 3:31:19 > top of Java-index,Java Essentials,Java Programming...
# 2
can u plz give a hint or an example.It would be so helpful of u ...
vishala at 2007-7-13 3:31:19 > top of Java-index,Java Essentials,Java Programming...
# 3
Timestamp extends Date. What do you want to have converted?
CeciNEstPasUnProgrammeura at 2007-7-13 3:31:19 > top of Java-index,Java Essentials,Java Programming...
# 4
I want to send the value as a date. This is because in other .java file i accept this value as java.sql.Date as a parameter
vishala at 2007-7-13 3:31:19 > top of Java-index,Java Essentials,Java Programming...
# 5

Did you mean a java.sql.Timestamp? If so, then yeah - as above.

If you meant that you've got a string containing the representation of a date, and you want to get hold of that date - take a look at the java doc for java.text.DateFormat and java.text.SimpleDateFormat.

You'll find lots of examples thre.

~D

aconst_nulla at 2007-7-13 3:31:19 > top of Java-index,Java Essentials,Java Programming...
# 6
Excuse me while I crawl back under my stone.....
aconst_nulla at 2007-7-13 3:31:19 > top of Java-index,Java Essentials,Java Programming...
# 7

> I want to send the value as a date. This is because

> in other .java file i accept this value as

> java.sql.Date as a parameter

Why do you have java.sql.Timestamp objects then?

Why not directly getting java.sql.Date object from database?

Why do your java classes use java.sql.Date instead of java.util.Date?

TimTheEnchantora at 2007-7-13 3:31:19 > top of Java-index,Java Essentials,Java Programming...