cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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.
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

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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (6,391)