?
Solved

ListView Time sort

Posted on 2011-09-21
1
Medium Priority
?
346 Views
Last Modified: 2012-05-12
Hello... I've written a small application using C#.net.
... in this application I have a listview which returns An ID number, time, and notes...
If I click the header of each column in sorts it from A to B, etc....  my problem lies in the Time sort...
if I click the Time header it sorts it and treats it as a string....
so instead of sorting;
5:00am
6:00am
5:00pm

it sorts;
5:00am
5:00pm
6:00am

How do I get it to sort based on the time..

Here is my line of code that gets the time and the rest of the column info from the access database

listView2.Items.Add(ds.Tables["Notes"].Rows[x]["NotesID"].ToString());
 listView2.Items[x].SubItems.Add(ds.Tables["Notes"].Rows[x]"Tim"].ToString());
 listView2.Items[x].SubItems.Add(ds.Tables["Notes"].Rows[x]["Notee"].ToString());
0
Comment
Question by:MrMay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 37

Accepted Solution

by:
Neil Russell earned 2000 total points
ID: 36575091
Use 24 hour format is only way I can think of.
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Simple Linear Regression
Six Sigma Control Plans
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question