Sorting Dates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ID94
    New Member
    • Oct 2006
    • 4

    #1

    Sorting Dates

    I am in need of some helpwith two problems.
    1. I'f got some dates in a array and want to sort them. Starting from the oldest to the newest.
    2. Is there also a way to calculate todays date plus seven ie in a weeks time?

    Any help is greatly appreciated
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by ID94
    I am in need of some helpwith two problems.
    1. I'f got some dates in a array and want to sort them. Starting from the oldest to the newest.
    2. Is there also a way to calculate todays date plus seven ie in a weeks time?
    Any help is greatly appreciated
    The simplest way to sort is probably to code your own "bubble" sort. Do a search on Google, you'll find plenty of sample VB code to do a bubble sort, or (given that bubble is about the slowest) lots of different types. The bubble just happens to be about the simplest to code.

    As for the calculation, see the online help for the DateAdd() function.

    Comment

    • ID94
      New Member
      • Oct 2006
      • 4

      #3
      Thanks will try tonight

      Comment

      Working...