YES IT WORKS!
<bean:define id="myDate" name="myContainer" property="fieldObject(myData)"/>
..
<bean:write name="myDate" />
I get the date&time as milli seconds and I will go on and write some selection statements.
Regards
/Lars Hagrot
To: <[email protected]>
From: Philippe Vollenweider <[EMAIL PROTECTED]>
Date: 10/28/2005 04:01PM
Subject: Re: How to compare a date?
Hello,
If you use scriptlet, you can use the getFieldOject methode
JahiaContainer myContainer = (JahiaContainer) entriesEnum.nextElement();
long myDateLong = -1;
try {
myDateLong = Long.parseLong((String)myContainer.getFieldObject("myDate"));
} catch (NumberFormatException nfe) {
}
Did you try to do seomething similar with taglib (never try)?
<bean:define id="myDate" name="myContainer" property="fieldObject(myData)"/>
Philippe.
At 28.10.2005 15:48, you wrote:I have a container with a startDate and an endDate field.
I want to show the container if curent date is in between those dates.
How can I compare with current date? (System.currentTimeMillis())
I can find some java code doing by using java code (scriplet) (box_news.inc).
But how can we do this by using taglibs (jahia,jstl,struts)?
...
<content:dateField ..../>
...
<c:if test="${ ????? }">
// Show container fields...
</c:if>
...
Regards
/Lars Hagrot-------=[ pvollenweider at jahia dot com ]=---------
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company
