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

Update SQL - Date format wrong?

Hi, 

We are updating a MS SQL table using a simple query to update the date in some record from a workflow.

When we run it manually (using the Execute Now within the Execute SQL action) it works as expected, but when it runs from the Worfklow it inverts the date (from dd/mm/yyyy to mm/dd/yyyy, only when the day is less tan 12, indicating that it can tell between day and month since there's only 12 months) and we don't know why.

Our query:

UPDATE Table

SET DATEFIELD = CONVERT(DATETIME,'04/11/2018',103)

WHERE ID = XXX

Manually this ends up being November 4th, but when it executes from the WF, we end up getting April 11th.

The query within our Execute SQL action is:

UPDATE Table
SET DATEFIELD = CONVERT(DATETIME,'{ItemPropertySmiley Very Happyate}',103)
WHERE ID = {WorkflowVariableSmiley TongueK}

Whenever we log ItemPropertySmiley Very Happyate, it logs 04/11/2018 as a string, maybe the behavior is different for this action??

What are we missing?

Thanks!

Labels: (1)
Tags (2)
0 Kudos
Reply