You are viewing limited content. For full access, please sign in.

Question

Question

Issue inserting date data from forms to SQL database

asked on June 14, 2015

Hi there,

I have a form that captures a date (the default is today and the format is dd/mm/yyyy. After the form is saved to the repository a workflow is initiated to insert the data including this date into a SQL table. If the day is greater than 12 the insert fails as SQL thinks the dd is the mm. When I choose or key in the date 14/06/2015,  submit the form and then look at the results and the variables I can see the date as follows:

compReceivedDate

6/14/2015

Does anybody know how this issue can be resolved?

Carmel

 

 

 

2 0

Replies

replied on June 15, 2015

Workflow uses the system date format as set in Windows for the user the Workflow service is running under. It looks like your Workflow Server is running with M/d/y settings while SQL is running with d/M/y settings? You can change the Windows date format on the Workflow Server, though, it might be easier to format the token as an invariant date (yyyy-MM-dd) before inserting it into SQL.

1 0
replied on June 14, 2015

Did you use "Retrieve Laserfiche Forms Content" in Workflow to get the date field value? If so, can you check the token "retrievelaserficheformscontent_dateVariable" using track tokens in Workflow to see if the value is correct? This value should not be affected by forms date field format.

During my test, it would show 6/14/2015 in workflow when your input was 14/06/2015 in forms.

0 0
replied on June 15, 2015

Hi Rui,

I was using retrieve field values from the template that I apply to the form when it is saved to the repository. I wasn't aware of the "Retrieve Laserfiche Forms Content". I will try this, this evening and see how the date looks. Thanks, Carmel

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.