cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
elko
Nintex Newbie

issue with date field and xml

Jump to solution

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

Tags (2)
0 Kudos
Reply
2 Replies
allan
Nintex Newbie

Re: issue with date field and xml

Jump to solution
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)
0 Kudos
Reply
elko
Nintex Newbie

Re: issue with date field and xml

Jump to solution

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.

Conditional Branch.png

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

Convert Value.png

0 Kudos
Reply