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 Apps / Seconds of Time lost w...
Power Apps
Unanswered

Seconds of Time lost when moving time in and out of SQL?

(0) ShareShare
ReportReport
Posted on by 730

I am pulling in time from SQL and using it in an app and then writing it back to SQL. Somehow when it I put it back into SQL the seconds are lost (or set to 00).

 

In most cases my code writes time to SQL in this method:

SignoutTime: Text(Now(),"[$-en-US]hh:mm:ss")

In this app I am pulling in the time from SQL like this:

"InTime",
First(
 ForAll(
 MatchAll(
 MorningSigninTime,
 "PT(?:(?<hours>\d+)H)?(?:(?<minutes>\d+)M)?(?:(?<seconds>\d+)S)?"
 ),
 Time(
 Value(hours),
 Value(minutes),
 Value(seconds)
 )
 )
).Value,

Which gives me this:

BrianHFASPS_0-1696969816005.pngBrianHFASPS_1-1696969827709.png

This is how I write it back to SQL:

InTime: InTime

ActivityOneSigninTime: First(
 ForAll(
 MatchAll(
 ActivityOneSigninTime,
 "PT(?:(?<hours>\d+)H)?(?:(?<minutes>\d+)M)?(?:(?<seconds>\d+)S)?"
 ),
 Time(
 Value(hours),
 Value(minutes),
 Value(seconds)
 )
 )
).Value,

The second one is a direct version rather than an in between.

 

Any ideas why I am losing the seconds on the patch back into SQL? Do I need to convert to Text all the time before patch to SQL?

 

Categories:
I have the same question (0)

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 421

#2
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 278 Super User 2026 Season 1

Last 30 days Overall leaderboard