• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Date formatting / postDate

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I'd like to format the date in the Forum List and elsewhere (e.g. lpi.postDate). Is there a way to format it right in the .htm template file?

Best,
Michael
[originally posted on jforum.net by smi]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can set the date format used in your jforum-custom.conf file with the dateTime.format property. E.g.:

dateTime.format = dd MMM yy HH\:mm zzz

Will produce: 28 Mar 07 9:45 EDT

Note the time zone / month name are based on your server's locale setting.

The format string is used by the Java SimpleDateFormat class. See the Javadocs for this for details on all the formatting elements.
[originally posted on jforum.net by monroe]
 
You showed up just in time for the waffles! And this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic