Solved

K2 Cloud Smartform view showing incorrect date

  • 10 February 2020
  • 5 replies
  • 34 views

Badge +3

I've got a view in a SmartForm that's showing the date incorrectly. The view uses an Azure SQL-based data source and the dates show up correctly in SQL when I query the database, but when it shows up a day earlier in the view. For reference, I'm in PST.  Anyonw know why this might be the case?

icon

Best answer by Vernon 11 February 2020, 14:13

View original

5 replies

Badge +7

Hello  @RayBoone 

 

When configuring the servers for DateTime cultures in K2 smartforms, it is important to ensure that all servers are using the same timezone and culture settings. This will prevent issues with datetime values.

 

Please take a look here: https://help.k2.com/kb001458 to help solve your issue.

 

Enjoy

 

Good day RayBoone

Please also see the following.
Calendar Control displays a different Date value in different Time Zones: https://help.k2.com/support-services/kbt135043,
“Calendar control using SQL DateTime value showing wrong day”: https://community.k2.com/t5/K2-blackpearl-Articles/Calendar-control-using-SQL-DateTime-value-showing-wrong-day/ta-p/90216.

Best,
Sunrise
Userlevel 4
Badge +14
I have seen this happen when SQL and View control doesn't use the same data type. IE, SQL uses Date and View Control uses DateTime.

HTH
Vernon
Badge +3

That fixed it--what you described is exactly what was going on. View had it as a date/time and the SQL data type is date. I went into the SmartObject and changed the data type to date and all is good. Thank you!

Badge +3

The fix was making the view and SQL both use Date. One had date/time, the other was date.

Reply