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 Platform Community / Forums / Power Automate / Add time field to date...
Power Automate
Answered

Add time field to date field to format as DD-MM-YYYY T HH:mm:ss

(0) ShareShare
ReportReport
Posted on by 301

I have a date field with format dd-mm-yyyy and a time field with hh:mm:ss and create a calculated field Start Date as DD-MM-YYYY T hh:mm:ss and also another calculate date field as End Date : Start Date + Time field(another time field)
This date value are meant to be push into date field of Sharepoint list item.
Please help, I'm struggling with the right expression

Categories:
I have the same question (0)
  • Srini007 Profile Picture
    3,463 Super User 2026 Season 1 on at

    Hi @apeawakening 

     

    Try as below

     

    Initialize variable: DateField = 13-05-2024
    Initialize variable: TimeField = 10:00:00

    Set variable: Day = split(variables('DateField'),'-')[0]
    Set variable: Month = split(variables('DateField'),'-')[1]
    Set variable: Year = split(variables('DateField'),'-')[2]

    Set variable: Hour = split(variables('TimeField'),':')[0]
    Set variable: Minute = split(variables('TimeField'),':')[1]
    Set variable: Second = split(variables('TimeField'),':')[2]

    Set variable: ReformattedDateTime = concat(variables('Day'), '-', variables('Month'), '-', variables('Year'), 'T', variables('Hour'), ':', variables('Minute'), ':', variables('Second'))

    Output: ReformattedDateTime (2022-04-23T10:00:00)

     

     

    If you find this reply helpful, please consider giving it a LIKE AND

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION

     

    Cheers,

    Srini

     

  • Ape Awakening Profile Picture
    301 on at

    @Srini007 , thank you so much .
    I was just wondering will this ReformattedDateTime will get pushed into Sharepoint list item ?

  • Verified answer
    Srini007 Profile Picture
    3,463 Super User 2026 Season 1 on at

    Hi @apeawakening 

     

    It depends on the sharepoint list column, If it is a string column, then no issues, it can be pushed, else if it is a DateTime column then you might put another step by the below expression

     

    formatDateTime(variables(‘ReformattedDateTime’), ‘yyyy-MM-ddTHH:mm:ssZ’)

     

    If you find this reply helpful, please consider giving it a LIKE AND

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION

     

    Cheers,

    Srini

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard