Actually it should return false :) A quick test would show the value being returned is -7 not 7. The conclusion would be the function is returning Date2 - Date1. The documentation found on the MSDN library would also confirm this.
"Required. Date. The two date/time values you want to use in the calculation. The value of Date1 is subtracted from the value of Date2 to produce the difference. Neither value is changed in the calling program. "
When in doubt always check what value IS being returned, don't just assume.
**EDIT**
Calling FileClose(1) inside your loop will close the file. When you call EOF(1) the next time it will throw an error. You shouldn't close the file until your done with it. Also, if you haven't explored the StreamReader and StreamWriter classes I would recommend looking into them. I just find the stream classes a better way to read/write to files. Plus in my experience they are more efficient.
Enter your message below
Sign in or Join us (it's free).