Time Difference

Hello haven’t used Appgyver for a very long time. (mostly because of other time committments) but I have come back to try again. I have looked through the forum and can’t locate what I am looking for. I have a start time and end time, both with the PickTime flow. I have two questions:

  1. When I fill the field with the chosen time, no issues, Is there a way to get the AM, PM to show up. I have tried various formulas but to no avail.
  2. I have looked at the DATETIME_Difference formla and have tried to get the difference in times and no luck, also tried Subtract_duration using the STARTTIME as the first value but again no luck.

Any help would be appreciated. Also I will have other questions pertaining to this later.


Re Question 2, convert all times to unix, then do a simple subtraction, thats what I used.

1 Like

Thanks, i will try that. As per my first question. What I WAS trying to achieve is to show the time as: 5:30AM or 7:45pm. I came up with this formula that seemed to work:

IF(NUMBER(SUBSTRING((FORMAT_DATETIME_LOCAL(repeated.current.tsend, “hh:mm”)), 0, 2)) <= 11, FORMAT_DATETIME_LOCAL(repeated.current.tsend, “hh:mm A”), FORMAT_DATETIME_LOCAL(repeated.current.tsend, “hh:mm A”))