SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2011
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I sort a collection by date?

    I have a collection of members from a xml file. A member contains first name, last name, birthdate, etc.
    I'm a bit confused on how to sort a collection by a specific attribute, such as birthdate. Help is much appreciated. Thank you

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    One way would be to create a client recordset from the XML data, then sort the recordset on the relevant field.

    Another could be to create an array from the XML data and sort the array.
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2011
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your response!

    I stored it in an array and sorted it from there.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •