Hello,
I am trying to run a query using the SwitchOffset built in function to modify the timezone on a DatetimeOffset field.
I am receiving the following error: "The timezone provided to builtin function switchoffset is invalid."
Here is the query:
Select SWITCHOFFSET(La stFailedOn, Cast((GMTOFFSET * 60) as int)
from MyTable
Note: LastFailedOn is of DatetimeOffset type and GMTOFFSET is of type float.
Also, the range of GMTOFFSET is between -10 and 11 with no NULLs.
Finally, when I replace the time_zone attribute with an integer (ex: -300), the query works no problem. I have tested the time_zone calculation on my data and all values returned are valid signed integers within the valid GMTOFFSET range.
Thanks,
Jason
I am trying to run a query using the SwitchOffset built in function to modify the timezone on a DatetimeOffset field.
I am receiving the following error: "The timezone provided to builtin function switchoffset is invalid."
Here is the query:
Select SWITCHOFFSET(La stFailedOn, Cast((GMTOFFSET * 60) as int)
from MyTable
Note: LastFailedOn is of DatetimeOffset type and GMTOFFSET is of type float.
Also, the range of GMTOFFSET is between -10 and 11 with no NULLs.
Finally, when I replace the time_zone attribute with an integer (ex: -300), the query works no problem. I have tested the time_zone calculation on my data and all values returned are valid signed integers within the valid GMTOFFSET range.
Thanks,
Jason
Comment