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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow Send wrong Time d...
Power Automate
Unanswered

Flow Send wrong Time details to SQL server DB

(0) ShareShare
ReportReport
Posted on by

Hello Experts,

 

I have one flow which sends data from SHarepoint List to SQL server. The issue is date filled correct but sometimes time values are in incorrect format.

my SP list Datetime columns are formatted to 24 hrs format , same format i want in SQL server but it send 12 hr format sometimes and sometimes it sends correct 24 hr format.

for example if the SP list time DateTime is : 5/26/2021 17:12

in SQL table it stores DateTime : 2021-05-26 05:12:00.000

 

This is the formula i am writing in flow to get the dates.

formatDateTime(triggerBody()['ActivityStartDate'],'yyyy-MM-ddThh:mm:ssZ')

 do i need to change anything here , please advise. i will be very grateful.

Categories:
I have the same question (0)
  • PrasadAthalye Profile Picture
    on at

    Convert to following format and it should work...

     

    formatDateTime(utcNow(), 'MM/dd/yyyy hh:mm:ss')
  • Community Power Platform Member Profile Picture
    on at

    Hey @PrasadAthalye , Thanks for the suggestion , where i will mention my field here "ActivityStartDate" in this formula. can you provide the complete formula , mentioning the field 

  • PrasadAthalye Profile Picture
    on at

    Refer below...

    formatDateTime(triggerBody()['ActivityStartDate'],'MM/dd/yyyy hh:mm:ss')

     

  • Community Power Platform Member Profile Picture
    on at

    Hello @PrasadAthalye , I tried this expression. it is still giving wrong time. Please see  below

    Time in SP list : 5/26/2021 20:02

    Time in SQL: 5/26/2021 04:02

     

    Please advise 

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    Hello @PrasadAthalye , My issue has been solved. This was due to timezone. i am writing this formula now.

    convertTimeZone(triggerBody()?['ActivityStartDate'],'UTC','Arabian Standard Time','yyyy-MM-dd HH:mm:ss')

    Thanks for your help and suggestions

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard