Print Page | Close Window

Date Question

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=12186
Printed Date: 30 March 2026 at 10:00pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Date Question
Posted By: zMaestro
Subject: Date Question
Date Posted: 15 October 2004 at 11:07am

I want to make an asp statement that says the following:

IF the date is between so and so then
blah blah blah

ELSEIF the date is between so and so then
blah blah blah

End IF

How can this be done please?




Replies:
Posted By: ljamal
Date Posted: 15 October 2004 at 2:08pm
Asuming the date is stored in the variable dteDate

If dteDate > dte1 and dteDate < dte2 then
---
elseif dteDate >= dte2 and dteDate < dte3 then
---
end if

Use the CDate() funciton to be sure that dte1, dte2, dte3 are valid dates

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: zMaestro
Date Posted: 17 October 2004 at 9:24am

can you post any reference about the CDate() function?

thanks.



Posted By: ljamal
Date Posted: 17 October 2004 at 9:43am
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctcdate.asp - Cdate() Reference

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net