aspose file tools*
The moose likes Beginning Java and the fly likes Date Format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Date Format" Watch "Date Format" New topic
Author

Date Format

Lim Youjie
Greenhorn

Joined: Dec 27, 2004
Posts: 22
Hi,

may i know how to change the date format to CST of the Date object?

thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
The Date class has no concept of timezones. You will need to use the Calendar class.


Ping & DNS - updated with new look and Ping home screen widget
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
If you require a Timezone aware date implementation you might want to evaluate:

Joda Time

Regards, Guy
Joni Salonen
Ranch Hand

Joined: Jan 07, 2006
Posts: 53
You can set the time zone of a DateFormat object by using the setTimeZone method: http://java.sun.com/j2se/1.5.0/docs/api/java/text/DateFormat.html
For example:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date Format
 
Similar Threads
Another format check :P
is that any utility class that help compare date within start and end date ?
how to convert String into Date format
Conversion of date to Arabic
<bean:write/> of struts1