• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1293
  • Last Modified:

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


0
Testsubbu
Asked:
Testsubbu
  • 2
  • 2
1 Solution
 
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now