•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 391,764 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,194 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:
Views: 1244 | Replies: 2
![]() |
•
•
Join Date: Jul 2005
Location: Downingtown
Posts: 53
Reputation:
Rep Power: 4
Solved Threads: 3
I personally would not go for this particular way of storing times. If I was faced with this paritcular problem from a site that I was asked to maintain, I would write a one-shot script that would:
1. Alter the table to have an odbc datetime.
2. Read in all records from this table.
3. Loop over this table, updating each record's new odbc datetime with a translated version of your integer.
You would still have this integer field and instead of doing something programmatically with coldfusion you would foist the work off on SQL server, which would make this sorting perform better.
1. Alter the table to have an odbc datetime.
2. Read in all records from this table.
3. Loop over this table, updating each record's new odbc datetime with a translated version of your integer.
You would still have this integer field and instead of doing something programmatically with coldfusion you would foist the work off on SQL server, which would make this sorting perform better.
•
•
Join Date: Apr 2007
Posts: 28
Reputation:
Rep Power: 2
Solved Threads: 0
Thanks for your advice, hinde. I think your solution is probably more sound than the one I came up with. I'm just not that comfortable w/sql server, so what I did was create a table with 3 columns: hour, sort, and am_pm. I put all 1-12 & 1-11 in the hour column, sort order in the sort column, and am or pm in the am_pm column. So, the columns with one and pm has 13 as a sort. Then, I did an innerjoin on my hour and am/pm field in the tabe, and used the sort field to order by. It seems to be working.
Thanks again!
Thanks again!
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ColdFusion Marketplace
Similar Threads
- report (Visual Basic 4 / 5 / 6)
- Time check problem (C++)
- Templates (C++)
- Gigabyte GA K8NS PRO problem with cpu overheating (Motherboards, CPUs and RAM)
- Some help needed with Selection Sort in java, Please!! (Java)
- This ought to be simple - extra spaces (PHP)
- Merge sort (C++)
- Quicksort/Insertion sort Hyrbid? (C)
- help with sort using Calendar class getting null pointer exception (Java)
Other Threads in the ColdFusion Forum
- Previous Thread: Airline Reservation System
- Next Thread: How to get and encoded character to stay encoded?


Linear Mode