Reading Dates in Wrong Format

  • 30 April 2013
  • 4 replies
  • 1 view

Badge +3

We’ve run into a problem with Smart Forms and reading dates from a database and I was hoping you could shed some light on it for us:


 


When we have a date saved in the database (e.g. 2013-05-01 for 1st May 2013) and we read that into a calendar control, it is reading the days and months the wrong way round, so it will display 2013-05-01 (1st May 2013) as 2013-01-05 (5th Jan 2013)


 


This only happens if the day is less than or equal to 12, if it is greater it recognises that it must be the month field and displays correctly


 


Any ideas how we can get around this or if anyone else has come across the same issue?


4 replies

Badge +4

I have had similar issues before when running K2 workflows or smartobjects.


We always ensure the service account and servers are setup to use US formatting on dates and languages. Whenever we set them as UK the dates formatting is switched but K2 cannot handle this.


Hope this helps.

Badge +3

Thanks, this appears to have worked now we have set the server locale and language settings, IE and Chrome browser language settings and the location on the control style to US


 


We'll do some more testing to see if this still works when the browsers are using different settings, otherwise we'll be back in the same position

Badge +4

That's great news, please set my previous post as the solution if you feel this is correct. In future this will help other users. It will also give me internet points(!).

Badge +3

Looks like you have solved the problem after all, thanks for the suggestion, have marked your answer as having resolved my problem

Reply