cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Save result of calculated value as a Date and Time field?

Jump to solution

I have set up a calculated value field in a Nintex Form that gets the maximum date from a named Date/Time control in a repeating section, using the answer to this question.

Now I want to connect this maximum date to a Date and Time column on my SharePoint list.  Is there a way to convert what's in a calculated value field into something SharePoint recognizes as Date and Time, or some other way to stick this thing in a Date and Time column?

Labels: (2)
Reply
4 Replies
Workflow Hero

Re: Save result of calculated value as a Date and Time field?

Jump to solution

no, it's not possible to connect calc value control to a datetime field.

what you could do is to place datetime field on form and populate it with javascript based on value of calculated control.

0 Kudos
Reply
Workflow Hero

Re: Save result of calculated value as a Date and Time field?

Jump to solution

You could set your column on a workflow

Reply
Workflow Hero

Re: Save result of calculated value as a Date and Time field?

Jump to solution

This worked for me -- after looking at a lot of documentation about how to set up the Convert Value action in Nintex workflow, I found that the string that is put into the calculated value field by using ConvToDate(Math.max.apply(null,DueDate)) will work in the Convert Value action without any need for special settings.  So I just set up my list with a DueDateString column, populated from the calculated value on the form, and a DueDateDateTime column, populated by the workflow.

Reply
Workflow Hero

Re: Save result of calculated value as a Date and Time field?

Jump to solution

I'm glad if it works for you.

...and found my hack useful

but be aware!

I would be very careful with letting workflow convert string (considered to  be date) to real date datatype.

the date string (value of max date in your case) is determined on client and so follows client's locale/date formatting.

if multiple different locales are possible on client side in your env, you might/will end up with date strings in different formats. some of them might be converted correctly, some misinterpreted, and some completely fail to convert.

I will not elaborate further on if timezone(s) step in  a role...

I would personally forced conversion to date data type on client.

0 Kudos
Reply