I needed to return a date in a SQL query using the Nintex Form SQL Request Control. I can do this via a simple SQL query. However, the returned format is:
10/31/2016 12:00:00 AM
I need it to be 10/31/2016.
Yes, I can create a calculated control to format this SQL Request Control, but then I have to "hide" the control and only display the calculated control. What a pain!
I found that I can convert the date field in the SQL query to the format I need!
SQL query before:
SQL query after:
Select convert (varchar, EnrollmentStartDate, 101) AS EnrollmentStartDate
Both the Value and Display field in the SQL Request Control settings are "EnrollmentStartDate".
Here's the reference
to the date formats used in the Convert command. (The number referenced after the field.)