7 Replies Latest reply on Dec 17, 2008 4:11 AM by EJP

    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...