close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Compare time advice

Thread began 9/30/2009 9:44 am by akstudio | Last modified 9/30/2009 12:46 pm by Jason Byrnes | 1482 views | 1 replies |

akstudio

Compare time advice

Hello,

I am hoping someone can shed some light on this issue for me. Here is the scenario:

I have built a system that allows someone to input multiple events. Each event has a different time. Some may be at 3:30pm, some at 2:oopm .. etc. These events are displayed on a web page in order .. by date.

I have it currently setup so that when an event falls on the day of its scheduling, it is removed from the web page and then the next even is displayed. The order in which these are displayed is by date.

however... I know need to not only order by date.. I need to order by time... for example:

If an event is scheduled for 3:30pm today... this event should be displayed up until that time. Once 3:30pm hits, the next even is then displayed.

My current method only displays by date. So, if the event is 3:30pm, and 12:00am rolls around, on the day of the event, it is removed and the next even is displayed. This wont work because people should still be allowed to register for the event right up until the 3:30pm deadline.

I've done quite a bit of searching around a solution, and the more I search, the more confusing it becomes. So I am hoping someone can shed some light on this for me.

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

Am I correct in assuming the date is stored one column of your database, and the time in another?

is the time stored in military time? Or using AM/PM?

It sounds like you are using an if statement to display the event based on date such as:
if($row_Recordset1['dateColumn'] < date("m/d/Y")) {
<event info>
}



to compare against the time as well, change that to:
if(($row_Recordset1['dateColumn'] <= date("m/d/Y")) && ($row_Recordset1['timeColumn'] <= date("h:m:s a))) {
<event info>
}




more information on the date function can be found here:
function.date.php

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...