Search code examples
exceljbosscellseam

JBOSS SEAM Excel date cell


I have a cell that is displaying a date. I would like to add hours and minutes to the date being displayed, which, according to the jboss documentation, should be possible. I've tried a few variations to force the cell to display HH:mm with the m/d/y but have had no luck and haven't found much after googling. I am wondering if anyone else has had a similar experience or knows a solution. If there is any more information I can provide, I will!!

A variation of what I've tried..

<e:cell templates="tableCellTemplate"
                value="#{pivotRow.statusEntryDate}" forceType="date" mask="FORMAT9" style="xls-format-mask: FORMAT9" />

Solution

  • I know there exist a tag for this: "convertDateTime", maybe it could help. This is how it works:

    <ui:composition xmlns:s="http://jboss.com/products/seam/taglib"
                    xmlns:h="http://java.sun.com/jsf/html">
    
     <h:outputText value="#{pivotRow.statusEntryDate}">
       <s:convertDateTime pattern="MM-dd-yyyy hh:mm:ss a z" />
     </h:outputText>
    

    Here are the specs about convertDateTime

    I used it with outputText tag as you can see, but maybe it works in your cell tag.