date sort in form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • llee
    New Member
    • Jul 2006
    • 3

    date sort in form

    I created a database and wanted to view my multi-year data in date order. Unfortunately, it sorts the info in the right month and day but doesn't by year. For example, 1/17/2006, 1/18/2006, 1/20/2007, 2/2/2006, etc. Any tips on how to fix this? Thanks!
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    The problem is the order of the fields that you are using to sort on. When sorting dates the best method is to format them as YYYY/MM/DD before sorting, this way it will get the dates in chronological order.

    Also note I have used DD i.e. 2 digit day and MM 2 digit month if you do not do this then the 20th will come before 3rd and November and December (11 and 12) will come just after January and before all the other months of the year.

    Comment

    • llee
      New Member
      • Jul 2006
      • 3

      #3
      It's perfect. I got it to work. Thanks so much for your help! :)

      Comment

      Working...