
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:
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?