CXLSX
CXLSX

Reputation: 65

Convert time from UTC to Local timezone

I'm sending an email and I want to get the time when a file is uploaded, but the default time is in UTC.

I tried several things to convert from UTC to Central Time for example. Is there any expression to convert from UTC in Azure Logic Apps?

I tried the following expression:

convertTimeZone('HH:mm:ss', 'UTC', 'Pacific Standard Time')

Upvotes: 3

Views: 11642

Answers (1)

VenkateshDodda
VenkateshDodda

Reputation: 5526

As suggested by Timothy Radier , you can use combination of both formatDateTime ,convertTimeZone expression to covert the UTC time zone to Central standard time zone.

formatDateTime(convertTimeZone(utcNow(), 'UTC', 'Central Standard Time'),'HH:mm:ss')

Alternatively , By default central time zone is 5 hours behind the utc time you can also use 'subtractFromTime' expression to convert utc time to central time.

formatDateTime(subtractFromTime(utcNow(),5,'Hour'),'HH:mm:ss')

Here is the reference output :

enter image description here

Upvotes: 5

Related Questions