Reply
ASP Sorting Question
Old 06-28-2002, 03:38 PM ASP Sorting Question
zimbabwe's Avatar
Novice Talker

Posts: 6
Ok, here is a question that I don't think that I can answer myself in 5 min.

On my calendar site, I am posting event that are going on around my community. They are entered in by a registered member and then approved. Once they are approved, they show up as a list.

My question is, how can I sort this list out according to time with taking into account Noon and Midnight. I have been able to sort according to hours, minutes, and am / pm, but it can't distinguish Noon as being right after 11:59am or Midnight being right after 11:59pm.
It has those mixed up because of the am/pm switch.

I am sure that there has to be someone out there that knows more about databases / ASP than I do (probably anyone who is looking at this page).

Thanks in advance,

Zimbabwe
zimbabwe is offline
Reply With Quote
View Public Profile Visit zimbabwe's homepage!
 
When You Register, These Ads Go Away!
Old 06-28-2002, 03:40 PM
zimbabwe's Avatar
Novice Talker

Posts: 6
Oops, forgot the address.

The site is http://www.vcncommunity.com

You can see some events by going to the dropdown for Wyoming, then Gillette, then click on the right arrow to go to to July, then click on Events for the 4th.
zimbabwe is offline
Reply With Quote
View Public Profile Visit zimbabwe's homepage!
 
Old 06-28-2002, 05:44 PM
Skilled Talker

Posts: 66
Location: British Columbia, Canada
Zim.
I am a little confused. Are you using an SQL statement
to sort your datbase?

What database are you using?

Or are you using direct ASP code to sort your results?

If for example you were using an SQL statement in ASP against
an Access datbase you would simply us:

SELECT * FROM tblTest ORDER BY [dTime];

where tblTest is the name of your table of course

I tried this before posting and it works fine. AM appears before
PM.
wynpublishing is offline
Reply With Quote
View Public Profile Visit wynpublishing's homepage!
 
Old 07-01-2002, 04:52 PM
zimbabwe's Avatar
Novice Talker

Posts: 6
PM,

I am using an Access Database with direct ASP code to sort my results. Here is a copy of what I am using for the sorting.

order by startampm asc, timestarthr asc, timestartmin asc

I created several different dropdown menus: one for hour, one for min (by 15's), and one for AM / PM. I believe that this makes it difficult to use the [dTime].

I know that I probably did this the hard way, but it is what I have right now.

Do you know any way that I can make this still work (with noon and midnight)?

Zimbabwe
zimbabwe is offline
Reply With Quote
View Public Profile Visit zimbabwe's homepage!
 
Old 07-01-2002, 06:00 PM
Skilled Talker

Posts: 66
Location: British Columbia, Canada
Quote:
I created several different dropdown menus: one for hour, one for min (by 15's), and one for AM / PM. I believe that this makes it difficult to use the [dTime].
You are right, it is the hard way

You need one field for one date type field for the
time. Then your sort will work automatically for you!

If you need to keep things the way they are then I
would have to see the actual script to help you.
wynpublishing is offline
Reply With Quote
View Public Profile Visit wynpublishing's homepage!
 
Old 07-01-2002, 06:02 PM
zimbabwe's Avatar
Novice Talker

Posts: 6
ok... I will rename the script to .txt so that you can look at it.

http://www.vcncommunity.com/eventlistings.txt

you will need to open the source of the page to view it.



thanks

zimababwe

Last edited by zimbabwe : 07-01-2002 at 06:05 PM.
zimbabwe is offline
Reply With Quote
View Public Profile Visit zimbabwe's homepage!
 
Reply     « Reply to ASP Sorting Question
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13557 seconds with 12 queries