fmt:formatDate - jstl help

Posted on 2005-04-10
Last Modified: 2013-11-24
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,

Question by:Testsubbu
    LVL 8

    Accepted Solution

    keep the above JSTL inside
     <c:if test=${check the date}">
        <fmt:formatDate value="${test.startTime}" pattern="hh:mm a dd-MMM-yyyy"/>

    Author Comment

    how do you check the date  is my question?
    thanks, testsubbu
    LVL 8

    Expert Comment

    Please provide the code where you are getting this test from?

    Author Comment

    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}">

    thanks a lot testsubbu


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    The viewer will learn how to implement Singleton Design Pattern in Java.
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now