1 Reply Latest reply on Mar 27, 2014 1:12 AM by raybaudi

    Trouble Writing a "Logical" Case

    ElvieFrey

      Title

      Trouble Writing a "Logical" Case

      Post

           I have tried in vain to get this case function to work.  It seems like it should be pretty straight forward but it simply does not work.  

           Case( TimeStamp <"7:00:00 AM";"No";TimeStamp < "5:00:00 PM"; "Yes";"No")

           When a record is created this calculation is run to define field "x". Field "x"(defined in the database as a text field) would have a simple yes or no entered on creation.  Timestamp is a field that is exactly what it sounds like, it is stamped with the time (time only no date) when the record is created. So the "Timestamp" field is defined as a "time" field in the database. 

           The basic script that I am trying to accomplish is field "x" would have a "Yes" entered if the record was created during working hours (7am-5pm) and a "No" if the record was created after hours (5pm-7am).  I will use this information for another script that will send reports etc.

           Before this I tried to write an IF statement with an "AND."  That also failed miserably.                                                                    IF ( Get (CurrentTime) > "7:00:00 AM" AND Get (CurrentTime) < "5:00:00 PM", "Yes", "No")