2 Replies Latest reply: Jul 28, 2015 10:36 AM by Jo Campbell RSS

    How to compare time part of timestamps

    Jo Campbell



      I'm trying to create some courier delivery codes from timestamps but am struggling to figure out the correct date/time functions to use.


      So for example, if a timestamp has a time part of 9am, the delivery code is '9AM'. Similarly, if a timestamp is before 12pm (and not equal to 9am) then the code is 'AM'.


      For the 9am code I have tried a few things like the below but none of them give the expected result....


      If(Time(Timestamp(PromisedDelivery, 'hh:mm')) = MakeTime(9), '9AM', 'Other')


      Can anyone point me in the right direction?