web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

@formatdatetime issue

(0) ShareShare
ReportReport
Posted on by 6

Greetings

 

I am trying to format date time from UTC to iso 8061 I have tried formatDateTime(utcNow(),'yyyy-MM-ddThh:mm:ss') and it spits out both of the time stamps together like "2021-09-21T15:30:00.02300002021-10-15T11:13:43"  How do I get it to just spit out the later half and not the utc as well?

 

 

Categories:
  • Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @46m4art,

     

    You can specify the format also within the utcNow function.

     

    Can you try this expression instead:

    utcNow('yyyy-MM-ddThh:mm:ss')

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @46m4art :

    I've made a test and it worked as expect:

    vbofengmsft_1-1634538955596.png

     

    vbofengmsft_0-1634538930069.png

    Is that you want?

    Best Regards,

    Bof

     

  • 46m4art Profile Picture
    6 on at

    Okay I tried the above and this is the error it kicked back, these are the types of errors I am seeing regardless of what I am trying.  I feel like I am missing something 

    46m4art_0-1634569568445.png

    The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/TimeS' is required to be of type 'String/date'. The runtime value '"2021-09-21T15:30:00.02300002021-10-18T03:03:49"' to be converted doesn't have the expected format 'String/date'.

  • 46m4art Profile Picture
    6 on at

    I have tried multiple times, would it help to see the whole flow?  It is not working on my end

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @46m4art :

    Could you provide a screenshot of your flow in edit mode?

    Could you create a compose action and then set its value to 

    @{formatDateTime(utcNow(),'yyyy-MM-ddThh:mm:ss')}

    and check the result after it runs?

    Best Regards,

    Bof

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 275 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 178 Super User 2026 Season 2

Last 30 days Overall leaderboard