cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
makpith
Regular Visitor

export Attendance Card details (custom action) to SharePoint list

We need to convert  check-in time  (date&time) with AM Or PM, to fill date and time column in a SharePoint list

Please find the below screenshot  to check the time output

check answer 4 

 

KA.jpg

 
1 ACCEPTED SOLUTION

Accepted Solutions

use the below expression to convert it to dateTime

 

addSeconds(‘1970-1-1’, add(div(int(triggerBody()?[‘answer4’]),1000), 19800), ‘yyyy-MM-dd hh:mm tt’)

 

kindly change the highlighted value with your corresponding timeZone seconds like india is ahead by 5:30hr so I added 19800

View solution in original post

5 REPLIES 5
DeepakS
Super User
Super User

Hi @makpith 

 

Use following expression to get time in AM/PM format(12 hr pattern) 

 

formatDateTime(UtcNow(),'yyyy-MM-ddThh:mm:ss tt')
 
Replace UtcNow() with datetime string form your power automate.
 
-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
v-litu-msft
Community Support
Community Support

Hi @makpith,

 

Has your problem been solved by @DeepakS 's advice?
If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

Best Regards,
Community Support Team _ Lin Tu

Hi, I've done what you have suggested but it didn't work, please find attached file below:

 

So the Answer that comes directly from kaizala is as the attached file, which is something that should explain the Checkin time.

Checkin Time format.PNG

 

in the below photo i've placed the formula you have suggested and replaced the UTC with the Answer 4

Checkin Format.PNG

 

 

 

 

 

 

 

This is the Error i got, below:

 

Error.PNG

v-litu-msft
Community Support
Community Support

Hi @makpith,

 

What's the original time format of the Check-in? Are the "1582803512000" total seconds from a timestamp?

 

And seems like it is from the MS Form, could you please share more about the MS Form if it is? Such as the answer type, thank you.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

use the below expression to convert it to dateTime

 

addSeconds(‘1970-1-1’, add(div(int(triggerBody()?[‘answer4’]),1000), 19800), ‘yyyy-MM-dd hh:mm tt’)

 

kindly change the highlighted value with your corresponding timeZone seconds like india is ahead by 5:30hr so I added 19800

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (75,476)