Error: Expected a valid date value as the parameter to 'TimezoneOffset' function, received value : null.
We have an application that stores Request objects in SQL. One field in a Request is the Submitted Date (Date Time), and upon opening a request it calculates the Submitted Date by using TimezoneOffset. The current code is:
When opening the first Request in the users session a TimezoneOffset error appears, however the field always appears correct. Note that it does not appear anytime after the first Request unless the page is refreshed. Error: "Expected a valid date value as the parameter to 'TimezoneOffset' function, received value : null."
I have tried modifying the code slightly for error handling, however nothing has fixed this issue. Here are some examples: