Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Dec 27, 2004
Mar 04, 2006 07:06:00
may i know how to change the date format to CST of the Date object?
Joined: Mar 22, 2005
Mar 04, 2006 08:01:00
The Date class has no concept of timezones. You will need to use the Calendar class.
Ping & DNS, my free Android app for network diagnostics
Joined: Nov 24, 2000
Mar 04, 2006 11:05:00
If you require a Timezone aware date implementation you might want to evaluate:
Joined: Jan 07, 2006
Mar 05, 2006 05:07:00
You can set the time zone of a
object by using the setTimeZone method:
DateFormat df = DateFormat.getDateTimeInstance(); df.setTimeZone(TimeZone.getTimeZone("CST")); print(df.format(new Date()));
It is sorta covered in the
JavaRanch Style Guide
subject: Date Format
how to convert String into Date format
Another format check :P
is that any utility class that help compare date within start and end date ?
Conversion of date to Arabic
<bean:write/> of struts1
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013