Jump to content


< Back to Forum


 

Blank Date Field


  • Please log in to reply

#1 jiaseby 27 December 2016 - 04:44 AM

I'm pulling data from a table that is a date field.  I want to test if the field has a date in it or not.  It is a table with check information.  One of the fields is "Cleared".  If it is blank that means the check is still outstanding.  However when I look at the field I see it has a date in it when it's blank.  The date is 12/30/1899 12:00:00 AM.  Can you tell how I test for this?  It is the data in SQLCheck_4_1 in the engine log attached.

 

 



#2 SupportTeam 27 December 2016 - 06:53 PM

From the trace we can see that you are on the right track by using an Evaluate Expression type module to check whether date is 12/30/1899 12:00:00 AM

 

But as the $RVs are all stored as 'Strings', the comparison expression must use quotes, like this:

 

"$RV[SQLCheck_4_1]" = "12/30/1899 12:00:00 AM"

 

 

right now that Evaluate Expression module errors because quotes are not used:

 

 

123750.114   9   5   3 state [ClearDate] Evaluate [$RV[SQLCheck_4_1] = 12/30/1899 12:00:00 AM]
123750.114   9   5   3       rv    replace start [$RV[SQLCheck_4_1] = 12/30/1899 12:00:00 AM]
123750.114   9   5   3       rv    replace end   [12/30/1899 12:00:00 AM = 12/30/1899 12:00:00 AM]
123750.114   9   5   3       eval  [12/30/1899 12:00:00 AM = 12/30/1899 12:00:00 AM]
123750.115   9   5   3       VGMTYPE_EVALEXPR InvokeMember Eval Exception : Exception has been thrown by the target of an invocation.