Sign in to follow this  
Followers 0
CGRemakes

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

5 posts in this topic

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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

EDIT: Nevermind, got it to work. Thanks for the help!

Edited by CGRemakes

Share this post


Link to post
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
Sign in to follow this  
Followers 0