I have a flow where am trying to format SharePoint DateTime column "Schedule" into below format.
Tuesday, 23 June 2020 3:00 PM
So I have used the expression formatDateTime(triggerBody()?['Schedule'], 'dddd, dd MMMM yyyy HH:mm tt') which is giving me
Tuesday, 23 June 2020 09:30 AM. I understood it is sending me UTC time but I require in IST which would be 3:00 PM.
So I changed my expression to convertFromUtc(triggerBody()?['Schedule'], 'India Standard Time, 'dddd, dd MMMM yyyy HH:mm tt'') which is giving me the result Tuesday, 23 June 2020 15:00 PM. But here I want 3:00 PM not 15:00 PM. How should my expression look like to get Tuesday, 23 June 2020 3:00 PM.
I tried your code:
convertFromUtc(triggerBody()?['Schedule'], 'India Standard Time, 'dddd, dd MMMM yyyy hh:mm tt'')
but it shows below message, pls advise.
The expression is invalid.
@Krishna92 Thank you so much. This is now working.
Please change the expression as below
convertFromUtc(triggerBody()?['Schedule'], 'India Standard Time, 'dddd, dd MMMM yyyy hh:mm tt'')
This will give you time in 12 hour format
If this information helps you with resolution, please consider giving a thumbs up and mark the solution as resolved.