Time format

Im trying to sort a time column with data from a csv file. The column data from the csv file is in 12 hour format example below:
6:15-7:30 PM
7:00-8:30 PM
7:00-8:30 PM
9:00-10:15 AM
9:00-10:15 AM
10:15-11:30 AM
7:30-8:30 PM
3:00-4:00 PM
7:45-9:00 PM
5:30-7:00 PM
7:00-8:00 PM
9:00-10:30 AM
10:30-11:30 AM
7:30-8:30 PM
Noon-1:00 PM
7:00 PM-8:00PM
Noon-1:00 PM
Noon-1:00 PM
7:45-9:00 PM

Im having trouble with the results after sorting i.e. 6:00 - 7:00 PM follows 6:00 - 7:00 AM and so on. The text Noon is creating problems as well and ill have to change that.
I was hoping somoene could shed some light on this. Is it possible to change the data in my csv file to 24 hour format and then display it as 12 hour?
Or is there some other parameter i can use to specify the time format. I am a rookie when it comes to javascript so go easy.
June 8,
June 16,
First off what you have here is not a time column, it's a text column. A time field would have one time value and would not have 'noon' as a value. You are not going to be able to do a chronological sort on this type of data without writing a function to break the string apart, get the first part and turn it into a time value taking into account the 'noon' value and looking ahead in the string to see if it is AM or PM, then return the converted result and use that result to sort on. Not a simple task.
You may consider creating a new column with the result and sort on that column. Just a thought.
Jim Hunter
June 17,
Thanks Jim i do understand that i will have to remove Noon from all of the entires. Your suggestions were just greek enough to be confusing, would you care to elaborate any or provide a short example?
Anyone else doing something similar with any success?

June 18,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.