4 Replies Latest reply on Mar 29, 2017 12:27 PM by jbryan

    Hide object when (based on Timestamp) – Button Bar

    jbryan

      I have four fields that I want to hide based on the creation date.

       

      1. The first hides when the creation date is not today:

      not ( GetAsDate ( Notification::Creation TimeStamp ) = Get (CurrentDate) )

      Simple enough, that's working fine.

       

      2. Second hides when creation date is not yesterday:

      not ( GetAsDate ( Notification::Creation TimeStamp ) = Get (CurrentDate) - 1 )

      Looks like this works too.

       

      3. Third hides when creation date is today, yesterday or more than 6 days ago.

      GetAsDate ( Notification::Creation TimeStamp ) > ( Get ( CurrentDate ) - 1 ) &

      GetAsDate ( Notification::Creation TimeStamp ) < ( Get ( CurrentDate ) - 6 )

      This one is not working for me.

       

      4. Fourth hides when creation date is less than 7 days ago.

      GetAsDate ( Notification::Creation TimeStamp ) > ( Get ( CurrentDate ) - 7 )

      Also not working for me.

       

      QUESTION

      Do  > and < not work on dates? What am I missing?

       

      PURPOSE

      I'm creating a button bar that will display today's time for records created today, "Yesterday" for records created yesterday, the day of the week name for the day before yesterday through 6 days ago and the date for records created more than 6 days ago. It's intended to imitate the way dates display in an email client.

       

      When I get it working, I will post finished button here.