Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Error

Status
Not open for further replies.

chidi

Technical User
Mar 24, 2003
42
0
0
NG
To all you great coders, please help!!

I am having a date problem.
I have three fields:
Lov_date, deadline_date, and comleted.
completed is boolean = Yes/No.
What I am trying to accomplish here is that if lov_date is less than deadline_date then
completed should be yes
else
completed is No.
The problem is deadline_date contains some empty values.
As a result, I am trying to capture that by saying
if deadline_date is null, then completed should be No as well. That is the spec.
This is my code but it is not working.
Any help would be GREATLY appreciated:

if deadline_date = &quot;&quot; or date1 <= deadline_date then
completed = 0
else
completed = -1
end if
This is not working. Please help!!!
Thanks in advance
completed = NO
 
&quot;&quot; is not null, it is simply a string of length 0. That's not important at the moment though, as it doesn't apply to your problem.

Dates are stored numerically, but represented in human readable format. Thus, a blank date should evaluate to 0. Try replacing
Code:
deadline_date = &quot;&quot;
with
Code:
deadline_date = 0
and I think it will work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top