Hello all,
I'm building a function in a canvas app that executes a SQL stored procedure. The procedure is passed a row ID and what the row's last modified datetime should be, and if it finds a row where both match, it deletes it. It executes with no errors, but it outputs zero rows deleted and the row is still present in the SQL table. Everything works as intended when executed in SSMS.
The row in the SQL table has a last modified datetime of "2025-01-16 10:38:44.947". The record in PowerApps looks to have an accurate datetime of "1/16/2025, 10:38:44 AM"; even though the preview doesn't show milliseconds, it returns the correct epoch time when cast to a value. However, the stored procedure reports that it's being passed "2025-01-16 10:38:00.000". I don't have access to the SQL logs so can't tell if it's receiving zeroes or just no seconds or milliseconds.
I've tried passing the epoch time, but my version of SQL can't convert it to a datetime. Casting the datetime to text also omits seconds and milliseconds. I'm working on changing the stored procedure to accept an epoch time and convert it to a datetime using dateadd, but would rather not leave it like that.
Has anyone else encountered this before? And does anyone know of a better workaround than what I came up with?