D
DaBeef
I am having problems comparing dates using JSTL. I have the follwoing
code
<jsp:useBean id="now" class="java.util.Date"/>
<c:set var="nowdate" scope="request">
<fmt:formatDate value="${now}" type="DATE" pattern="yyyy-MM-dd"/>
</c:set>
<fmt:formatDate value="${busDate}" type="DATE" pattern="yyyy-MM-dd"/>
<!-- comare dates set to false,true"-->
<c:set var="historicalDate" value ="blank"/>
<c:if test="${busDate <= nowdate}">
<c:set var="historicalDate" value ="true"/>
</c:if>
Nothing seems to be getting compared properly. What format should I
put the dates in to properly compare them.
Thank-you for your help. I haev been looking into this for quite some
time.
thanks
code
<jsp:useBean id="now" class="java.util.Date"/>
<c:set var="nowdate" scope="request">
<fmt:formatDate value="${now}" type="DATE" pattern="yyyy-MM-dd"/>
</c:set>
<fmt:formatDate value="${busDate}" type="DATE" pattern="yyyy-MM-dd"/>
<!-- comare dates set to false,true"-->
<c:set var="historicalDate" value ="blank"/>
<c:if test="${busDate <= nowdate}">
<c:set var="historicalDate" value ="true"/>
</c:if>
Nothing seems to be getting compared properly. What format should I
put the dates in to properly compare them.
Thank-you for your help. I haev been looking into this for quite some
time.
thanks