I am querying a list to retrieve information about an item, e.g. let's say invoices for the purposes of this post. When I query this list using the "Query List" action, and choose to retrieve multiple field values into variables, it retrieves all field values correctly EXCEPT for dates which are returned in mm/dd/yyyy format, instead of dd/mm/yyyy format. The site's regional settings have been set to English (Australia). This causes a huge issue in a "Set a condition" action that follows, when doing a date comparison.
When comparing dates in the set a condition action, the date comparison doesn't work properly because the format is wrong. The test is looking to see if the returned due date of an invoice is before 1st of July 2012. If due date of the invoice is 3rd September 2012, it should be returning "false" as 3/9/2010 is greater than 1/7/2012. However, it's returning "true" is the date being returned from the query list action is "9/3/2012", which the subsequent set a condition action is treating as the 9th of March 2012, which is incorrect. I have confirmed this by writing the returned date of the invoice to the history list immediately after performing the query list action.
We seem to have found a workaround. The only way to get it to retrieve the date correctly is to perform two queries - one to retrieve information about the invoice EXCEPT due date, and then to query again with exactly the same query, but this time ONLY retrieving due date. So that essentially means that the workflow is performing two queries instead of one. Not great from a performance point of view. What we seem to have discovered is that if you ONLY return one field in a query list action, i.e. a date field, then the date is returned in the correct format, and the subsequent "set a condition" action works as it should, because the date format is returned correctly from the second query list action.
We're using NW 2010 Version: 184.108.40.206. Is this is bug that has been fixed, or is scheduled to be fixed in an upcoming release?