Date difference in Interface Vs Process model

Hello All,

 

I have an interface, where I am using a!dateField() component to select the date ranges.

If I select 18th Sep in the interface and submit the form, Its getting stored as 17th Sep in the process variables.  And I am storing the same PV value into SQL Sever its storing as 18th Sep which is correct but when I retrieve it back again its returning 17th Sep.

Can you please help me finding why there is 1 Day difference between interface and the process variables?

 

Note: When I test the interface rule its storing proper value in the Rule input Variables.

 

Kind Regards!!

Sujitha

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer
    I would be sure to wrap any saved date value in local() (or gmt() and then convert from there if the whole system is on one timezone). Also ensure that you are not confusing a Date with a DateTime. You could possibly be stripping out the time associated with the date and when it is read in as 00.00.00 and being converted to the previous day due to the selected time zone. Ensuring that the value being saved/selected in the form is the same value being written to the pv should correct the issue
Reply
  • 0
    Certified Senior Developer
    I would be sure to wrap any saved date value in local() (or gmt() and then convert from there if the whole system is on one timezone). Also ensure that you are not confusing a Date with a DateTime. You could possibly be stripping out the time associated with the date and when it is read in as 00.00.00 and being converted to the previous day due to the selected time zone. Ensuring that the value being saved/selected in the form is the same value being written to the pv should correct the issue
Children
No Data