Skip to main content

I have a date field in a repeating section. To be able to use the date fields in emails or tables etc I have to:

  1. query the repeating section xml - the output date text is 10/19/2018
  2. convert the value (invariant) - the output date is 19/10/2018 (which is exactly what I want as I'm in Australia and I want the format dd/mm/YYYY)

 

For 99% of cases I have no problem, but for 1% of submissions, the same suspects over and over again, I have different results. To make is easy to compare the results to the steps above:

  1. query the xml - the output date text is 19/10/2018
  2. convert the value (invariant) - the output date is "String was not recognized as a valid DateTime"

 

To rectify the situation I must open the form, save it, and restart the workflow. If I don't save the form again the issue persists.

 

Why does this happen for just some people and not others? In fact, why does this happen at all?

 

For #nintex365 #nintexonline

This happens because of regional settings of the user profile. Depending on their region and locale, the date format can change.
We have the same issue in my company, the ugly af workaround is to have different controls for days, months, years. One thing that you can try is to get the locale from the user profile and adapt the string to a specifiy format. (Have not tried that)

Thanks for the response. I thought I was going mad. Because we have offices around the world there is no way I can change the settings of each user profile to match.

 

For all those struggling this is my work around...

1. I create a conditional branch to see if the xml date field I'm looking at is of type DateTime. With the issues we're having it will either be of type DateTime (which documentation says it should be) or String.

2. If the xml field type is of DateTime I convert the value using Invariant as my regional settings, otherwise I use Default.


Reply