Comparing Dates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jyohere
    New Member
    • Apr 2007
    • 73

    Comparing Dates

    How can I compare two dates......but only the year,month and date.....not including the time.....compar eTo() function in Date class compares with even the time.....I want to compare with only the year,month and date
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    most of the methods in Date class r deprecated in newer version.

    i think u better to use GregorianCalend ar instead of Date class.
    best of luck.

    kind regards.

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by jyohere
      How can I compare two dates......but only the year,month and date.....not including the time.....compar eTo() function in Date class compares with even the time.....I want to compare with only the year,month and date

      Why not create new Dates that have the time field chopped off then you can use the compareTo method on them.

      Comment

      • dmjpro
        Top Contributor
        • Jan 2007
        • 2476

        #4
        a good technique ..... r035198x u told.

        Comment

        Working...