
January 22nd, 2003, 04:53 PM
|
|
Junior Member
|
|
Join Date: Jan 2003
Posts: 10
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Days left
Hello All,
I have the following. I want to give my users 10 days to access a part of my website. I also want to print the days a user has left in their 10 day subscription. I am using the Day(Now) function to insert 2 numeric values into 2 fields in my DB. A field called StartDate and a field named EndDate. Sometimes the EndDate is smaller than the start day which results in a negative number. Can someone point me in the right direction?
Here is what I am using
Start_Num = Day(Now)
End_Num = Day(Now) + 10
If End_Number > Start_Num Then
Total_Days = End_Num+31-Start_Num
Else
Total_Days = End_Num - Start_Num
End If
If Total_Days < 10 Then
Response.Write("You have" & " " & Total_Days & " " & "days remaining")
Else
Response.Write("Your Days are through")
End If
|