(Azure) How do I get and compare the Timestamp date from Table storage in a logic app?

Viewed 2488

I'm trying to make a simple Azure logic app, never made one before. It's set to check a Timestamp from a table in Table Storage.

I get a result List of Entities that contains the Timestamp that I want to compare but my question is how do I compare the value of "Timestamp" with for example utcNow() that is a string?

Get entities

  {
    "odata.etag": "W/\"datetime'2020-05-07T09%3A07%3A32.8275489Z'\"",
    "Timestamp": "2020-05-07T09:07:32.8275489Z"
  },

The error I get for now

I just want to get the Timestamp-string out so I can compare it to the utcNow-string.

1 Answers

According to the screenshots you provided, it seems the error happened in the "condition" to compare the timestamp. If you want to know how to compare the timestamp, you can refer to my sample below:

I initialize a variable(string) named "Timestamp" to simulate your timestamp from your table storage. In "Condition" we can use "ticks()" method to convert the timestamp(string) to ticks(number) and then compare them.

enter image description here

The expressions before and after the "is less than" are:

ticks(variables('Timestamp'))

ticks(utcNow())

Hope it helps~

Related