Jump to content

How to get _GUICtrlListView_SimpleSort to sort dates as dates not strings?


CGRemakes
 Share

Recommended Posts

I'm attempting to make it so when someone clicks on a header it sorts the information correctly. Most info is just a string, so we're fine there, but there are 2 columns that are dates (one that is a date and time). Sorting by those 2 columns, it treats them as a string, so it doesn't display in the correct order. I'm sure this has been discussed before, but my searches have come up empty. If there is a post, please point me in that direction. Most likely it's just I don't know enough to search for the right things. I assume I need to do some sort of custom callback function that converts the dates/times to a timestamp and sort them as numbers, but I'm not totally sure how to go about doing that.

Link to comment
Share on other sites

The help-file contains an example. See GUICtrlRegisterListViewSort() example #2.

Yeah, I saw that RIGHT after I posted the question. Guess that's the fastest way to figure out an answer to your own question is to post it in the forum. :graduated: Thanks for the quick reply.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...