|
-
Apr 3rd, 2000, 05:39 PM
#1
Thread Starter
Lively Member
i have a very simple question about dates: i want my program to expire after a certain date. i tried using this code:
Code:
If Date >= "4/25/00" Then
'some code
this doesn't work. could anyone give me any pointers on how to make a program expire? thanks a lot.
michael
-
Apr 3rd, 2000, 06:23 PM
#2
Hyperactive Member
use now instead
eg
if year(now) > = 2000 and month(now) >=4 then
msgbox("Expired")
endif
you can use day as well if you want.
otherwise
dim expiry as date
expiry = "#04/04/2000#
if expiry > date then
endif
-
Apr 3rd, 2000, 06:26 PM
#3
Hyperactive Member
Hello Michael,
I do think when you place the code:
MsgBox Date
the answer is: "4/4/2000"
use:
If Date >= "4/25/2000" Then'some code
Nice regards,
Michelle.
-
Apr 3rd, 2000, 06:32 PM
#4
Thread Starter
Lively Member
thanks a lot guys. i knew i was doing something wrong and i knew it was probably the simplest thing. well i was right. or wrong...as it is. i forget i needed the "#" on each side of the date and not the quotes to make it work. it works beautifully now. thanks again for your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|