|
-
Dec 5th, 2000, 09:47 AM
#1
Thread Starter
Junior Member
Hi can anybody help me..
I'm trying to take a date from a text file,
put it into a variable varExpiryDate, and compare the
ExpiryDate with the varDateNow variable..
If varDateNow >= varExpiryDate Then
MsgBox "This Program has reached the end of its time
limit."
End
End If
the previous code works if I manually put in the date instead of the variable varExpiryDate, #12/4/00#
The code to find the date is something like this
If InStr(TextLine, 1) = #12/5/00# Then
varExpiryDate = #12/5/00#
Call TimeLimit
End If
the date in the text file is written 12/5/00
if anyone can help I would be most grateful.
cheers
skat
-
Dec 5th, 2000, 09:56 AM
#2
Frenzied Member
-
Dec 5th, 2000, 10:00 AM
#3
Fanatic Member
I hate messing around with dates, so I usually revert to using Day(), Month() and Year() functions.
If you don't want to separate the dat into days, months and years for comparision purposes, try:
Code:
varExpiryDate = Format(txtOriginalDate, 'dd/mm/yy')
I don't know what date format your textual expiry date is in. You may even have to resort to using Left, Mid and Right functions to get the day month and year, and concatenate together agin using DateSerial()
Hope this helps...
-
Dec 5th, 2000, 10:13 AM
#4
Thread Starter
Junior Member
thanks
Thanks for the help guys, I'll give them a shot and see how I get on.
thanks
skat
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
|