Reputation: 91
When using CurrentTime in logic apps, it gives the full date/time value like 2020-06-14T20:16:49.0131751Z
How can I select the time only Like 20:16:49?
The reason: I want to use CurrentTime in a condition to do actions within certain time windows.
For example: if time current time is greater than 08:00:00 & less that 23:00:00 --> do action.
Upvotes: 1
Views: 3409
Reputation: 589
Make a call to an api that provides the time. For example: http://worldclockapi.com/
Upvotes: 0
Reputation: 15754
You can just use the formatDateTime() function in logic app to format your CurrentTime
, please refer to my logic app below:
The first expression(utcNow) is:
utcNow()
The second expression(formatDateTime) is:
formatDateTime(variables('CurrentTime'), 'HH:mm:ss')
Hope it helps~
Upvotes: 2