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

  • 18 January 2017
  • 4 replies
  • 18 views

Badge +5

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?


4 replies

Userlevel 5
Badge +14

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.

Userlevel 6
Badge +16

You could set your column on a workflow

Badge +5

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.

Userlevel 5
Badge +14

I'm glad if it works for you.

...and found my hack useful happy.png

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.

Reply