I am using getTimeStamp(column index, calander function)
In the specs its mentioned - This method uses the given calendar to construct an appropriate millisecond value for the timestamp if the underlying database does not store timezone information.
Is that Calander time zone parameter only works if the database does not store timezone information?
I am trying to retrive data using Locale.
In database my date is 2005-05-15 15:00:00. I am running my Local web server in CST time zone.
When I retrive value from database using Pacific time zone, I am getting same date and time. rs.getTimestamp(5, cal) --> 2005-05-15 15:00:00.0
Even without using timezone, I am getting same result rs.getTimestamp(5) --> 2005-05-15 15:00:00.0
When I retrive value from database using Pacific time zone
And how exactly do you do that? And for that matter, how do you retrieve data using a Locale? I have always used SQL to retrieve data. Clarification would help.
I am trying to use time without using SimpleDateFormat. My impression is that, SimpleDateFormat is basically use for Display purpose.
I want to change time using PST or any other time zone for further processing. What's the purpose of setting timezone in calendar and then set date in that?
TimeZone t = TimeZone.getDefault(); t = TimeZone.getTimeZone("EST");
java.util.Calendar cal = java.util.Calendar.getInstance(t);
java.util.Date date = new java.util.Date(); cal.setTime(new java.sql.Timestamp(date.getTime()));
What's the purpose of setting timezone in java.util.Calendar?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.