aspose file tools
The moose likes JSF and the fly likes converting epoch time to human readable format  using JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "converting epoch time to human readable format  using JSF" Watch "converting epoch time to human readable format  using JSF" New topic
Author

converting epoch time to human readable format using JSF

terry Kiernan
Ranch Hand

Joined: Aug 23, 2008
Posts: 31
Hi ,

I have the following in my xhtml 1.0 trying to convert epoch timestamp say " 1327486488 676088 "



But it is not converting the timestamp for me ....

Any ideas what i am doing wrong ?



Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 12513

The time-since-epoch is an internal long-integer variable to the java.util.Date, java.sql.Date and java.util.Calendar classes (assuming I remembered their package names correctly).

The JSF dateTimeConverter will automatically convert to/from a date object, but if your time is naked (long, int or String), the dateTimeConverter can't handle that. You'll need to wrap it in a date object.


One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
terry Kiernan
Ranch Hand

Joined: Aug 23, 2008
Posts: 31
Thanks Tim ,

Can you show me an example how to wrap it in the Date object ?

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 12513


 
IntelliJ Java IDE
 
subject: converting epoch time to human readable format using JSF
 
Threads others viewed
JSF dataTable issue
JSF datatable doubt
Centering a column heading in a datatable
Question on how to sort tomahawk datatable
This one _should_ be easy
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com