aspose file tools*
The moose likes JForum and the fly likes Change date and time format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Change date and time format" Watch "Change date and time format" New topic

Change date and time format

Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I have downloaded the source of Jforum and now I have to modify the date format used in JForm. I have seen this line:

In the class but I don't understand where the date format is defined ("dd/mm/yyyy hh:mm", for example).
Could someone help me?
Thanks, bye bye.
[originally posted on by abdujaparov]
Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
It checks for the /

The key within that properties is specifed by ConfigKeys.DATE_TIME_FORMAT. I assume that the string should contain something along with'date' or 'time' in it. You can check the if you find the value.

I suggest to not simple replace the value in the properties then, but rather add that key/value pair to the This file is always checked first, and overwrites the default values within the
[originally posted on by Sid]
Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
The value of this property is based on the "format string" used by the SimpleDateFormat class. The docs for this class describe the different abbreviations used in formatting dates fairly well. It even has a nice examples section. This doc is available here:

[originally posted on by monroe]
I agree. Here's the link:
subject: Change date and time format
Similar Threads
help me in time comparison
how to convert date to a string
Output a Calendar with timezone, in W3C datetime format?
java.text.ParseException: Unparseable date: ""
How to get month name