[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] Comparision of Values got from the DATEDIFF function - Reg



use some well placed 'show' commands, and then look at your log file.
Before the big 4 part condition check, write " show 'Before Condition.
Time11diff=' to_char(#Time_11_Diff) '.  Time19diff=' ...etc "

you might have to set those #'s to $ variables before the show, i dont know
if to_char works in show.  But there is a bit of a problem printing the #
variables.  Then place a "show '   entered -11, +19, UMP>=2, +18diff LOOP' "
inside that IF statment.  If it shows up in your log, then the IF was
evaluated as 'TRUE'.  Then place another inside your other statements.
Using those, you can see what IFs happen and what the variables are at that
time, and that should help you narrow down your problem.  Maybe some values
are being set wrong somewhere else.

-----Original Message-----
From: sqr-users-bounces+bstone=fastenal.com@sqrug.org
[mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of
KAVALAPARA Aravind Subramanian
Sent: Sunday, February 13, 2005 3:05 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] Comparision of Values got from the DATEDIFF
function - Reg

Hi Users,
 
I have a unique problem during the Condition checking for the variables
having values returned from the DATEDIFF function. My code for getting the
values is like this.
 
LET #Time_11_Diff = DATEDIFF($Shift_Start_Time,$Time_11,'MINUTE')
LET #Time_19_Diff = DATEDIFF($Shift_End_Time,$Time_19,'MINUTE')  
LET #Time_18_Diff = DATEDIFF($UMP2_Start_Time,$Time_18,'MINUTE') 

IF #Time_11_Diff < 0 AND #Time_19_Diff >  0 AND  #UMP_Count >= 2 AND
#Time_18_Diff > 0
               
In the above If condition, if all the metioned variables are satisfied then
it should do the further processing. But I have a few negitive test
conditions to be validated in which I need to Check for condition like
  
IF #Time_11_Diff = 0 .......................
 
The above condition is truly negitive. But even to that negitive condition
it is doing the further processing  which should not be done. 
 
Please let me know how to validate this.
 
All responses are appreciated.
 
Thanks,
Aravind.

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users