A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
How to convert Timestampformat to another format
Joined: Sep 28, 2008
Sep 17, 2009 00:34:08
I have a requirement to format the Timestamp format to another format, could any one explain the steps to do it.
The default timestamp format is
I need to fomrat it to
Please help to do this, and the return type must be always java.sql.TimeStamp.
Thanks in Advance.
Joined: Nov 24, 2005
Sep 17, 2009 00:37:43
java.sql.TimeStamp does not hold any particular format. It just holds the date itself (the values).
If you want to format dates, you can have a look at
All roads lead to JavaRanch
Joined: Oct 27, 2005
Sep 17, 2009 01:40:51
Christophe is correct. The only way to get hold of a date in a particular format is to use a
for the format.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions
How To Answer Questions
I agree. Here's the link:
subject: How to convert Timestampformat to another format
Bug in java.util.Date.toString():?
How to fetch Date Field from excel sheet in Java
How do I pad a timestamp string with 0s?
Insert a row into MS Access2003 successfully,But the long date(YYYY/MM/DD HH:mm:ss) was changed
xsd datetime format
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014