7 Replies Latest reply: Dec 16, 2008 10:11 PM by EJP RSS

    convert string to calendar

      bail me out of this problem

      i got 3 "Calendar" objects : "to" , "from" and "now"
      i got another Sting Object "n"
      where String n = now.toString()

      I have access to "to", "from" and "n"
      and I have to know whether n lies in between "to" and "from"

      The following code does not give right answer

      if(from.before(n) && to.after(n))
      System.out.println("n lies between to and from");

      help me out...