AnsweredAssumed Answered

Another species of date calculation query

Question asked by DavidDuncan on Feb 12, 2014
Latest reply on Feb 13, 2014 by philmodjunk

Title

Another species of date calculation query

Post

     Hi,

     I need to make the contents of one field a simple conditional calculation based on a date field.  

     My context is that versions of a simulation run before 12 February 2014 had an incorrect calculation and need to be flagged as such.

     In a table called "Runs"I have a field called "correctModDiff" that I want to carry a "y" if the field "date" is on or after the above date.

     I am familiar with IF statements from other applications, and that may be part of my problem, but I have spent hours fiddling with this and maybe one of you can fix it with a snap of the fingers.

     I have been perusing forum posts and responses about date calculations, and felt like I had found the solution at least 3 times, but nothing is working.  

     The problem is not that it won't evaluate, more that it is not discriminating between cases either side of the date in question.

     Currently, my calculation says this

     If ( GetField ( date )   ≤  Date ( 2 ; 12 ; 2014 ); "y" ; "n" )

     Is there something wrong with this that I am missing?

     You might want to be reassured that the field "date" is specified to be of type "date", and it is.

     * Note that, to my reading, the < sign is currently facing the wrong way, as I presume the above would give me "y" for dates earlier than Feb 12 2014. Whichever way, it just gives me the value i place in the ResultOne slot, occupied by "y" in the above example.

      

      

Outcomes