Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 NOW + If Then's
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

CrAzY
New Member

USA
50 Posts

Posted - 20 March 2001 :  16:31:55  Show Profile  Send CrAzY an AOL message  Send CrAzY an ICQ Message
I've got a table with a datetime record for date and two records for time - One for a Start Time, and One for and End Time

I'm attempting to create a:

If The Start Time Of Event => Now <= End Time Of The Event Then

"Tell them something is happening now!"

Sorta thing ... can anyone help me

This is what I already have for my variables

x_Date = RS("Radio_Date")
x_Start = RS("Radio_Start")
x_End = RS("Radio_End")

I'm Beyond Help

gor
Retired Admin

Netherlands
5511 Posts

Posted - 20 March 2001 :  16:39:56  Show Profile  Visit gor's Homepage
quote:

I've got a table with a datetime record for date and two records for time - One for a Start Time, and One for and End Time

I'm attempting to create a:

If The Start Time Of Event => Now <= End Time Of The Event Then

"Tell them something is happening now!"

Sorta thing ... can anyone help me

This is what I already have for my variables

x_Date = RS("Radio_Date")
x_Start = RS("Radio_Start")
x_End = RS("Radio_End")

I'm Beyond Help




How about:

IF (x_Date >= x_Start) AND (x_Date <= x_End) THEN
Response.Write("Something is happening! ;)")
END IF


Pierre
Go to Top of Page

CrAzY
New Member

USA
50 Posts

Posted - 20 March 2001 :  17:41:34  Show Profile  Send CrAzY an AOL message  Send CrAzY an ICQ Message
Almost there I think ...

not quite it tho ...

I need the 'NOW' to be in the statement - The (x_Date) is only the date of the event in the database. So I was trying to get it to pull up if the Date and Start Time is equal to or great than NOW and less than or equal to the Date and End Time

I'm Beyond Help
Go to Top of Page

SaiyanJin
Junior Member

115 Posts

Posted - 20 March 2001 :  19:43:57  Show Profile
If x_Date >= date Then
if x_Start >= time Then
Response.write ("event hasn't expired")
else
Response.write ("xstart is already passed")
end if
end if


is that what you want?

Go to Top of Page

CrAzY
New Member

USA
50 Posts

Posted - 20 March 2001 :  20:20:35  Show Profile  Send CrAzY an AOL message  Send CrAzY an ICQ Message
No that wasn't quite it ... but that put me on the track I needed to be. Thanks ...

Here's what I needed:


If Date = x_Date Then

If Time >= x_Start And Time =< x_End Then
Response.write ("Event is right now")
Else
Response.write ("No Event Right Now")
End If

End If


Thanks for the help!

If you wanna see the beta page I'm working on it's here: Click Here

I'm Beyond Help
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07