fmt:formatDate - jstl help

Dear java experts,
                            I have a situation where i am using the jstl tags to display date.
my code is

<fmt:formatDate value="${test.startTime}" pattern="hh:mm a dd-MMM-yyyy"/>

but if  test.startTime= "01:00 AM 01-Jan-1890",
then i need to display in my jsp  a string like  "BeyondRange"

this is really urgent.


thanks so much,
Testsubbu


TestsubbuAsked:
Who is Participating?
 
koppchaCommented:
keep the above JSTL inside
 <c:if test=${check the date}">
    <fmt:formatDate value="${test.startTime}" pattern="hh:mm a dd-MMM-yyyy"/>
</c:if>
0
 
TestsubbuAuthor Commented:
how do you check the date  is my question?
thanks, testsubbu
0
 
koppchaCommented:
Please provide the code where you are getting this test from?
0
 
TestsubbuAuthor Commented:
assume that  i have two dates
<fmt:formatDate value="${test.startTime1}" pattern="hh:mm a dd-MMM-yyyy"/>

<fmt:formatDate value="${test.startTime2}" pattern="hh:mm a dd-MMM-yyyy"/>
how do i check to see if two dates are equal or no with your
<c:if test=${check the date}">
</c:if>

thanks a lot testsubbu


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.