Nintex Workflow - How To Set a DateTime field to Current Date AND Time

What: Surprisingly had some trouble with this simple task, so here's how you can avoid wasting 20 minutes of your life.  If you have a list column that is of type Date AND Time, it can be difficult to set it to the current date and time inside a workflow.

Why:  You might like to do this if you were logging changes to items to a separate list for reporting on later.

How (quick): Create a string variable called 'CurrentDateTime', set the string variable to equal 'CurrentDate[space]CurrentTime'.  Set your DateTime list column to equal the workflow variable CurrentDateTime.

How (detailed):
  • Create a Workflow Variable called 'CurrentDateTime' of type 'Single line of text'
  • Create a 'Set Variable' step and set CurrentDateTime to equal value: Current Date[space]Current Time
    (these two values can be found under common variables tab).



  • Update the field on the list item to equal the Workflow variable you just set.  In my case, I was updating my DateTime field called End Time to equal CurrentDateTime variable.

Comments

  1. Replies
    1. Gday Sherly, what seems to be the problem?

      If nintex error messages aren't helpful, sometimes it helps to create a 'log history' step after setting variables so you can make sure the variable is formatted correctly.

      Happy to help further if you're still stuck.

      Cheers,
      Brett

      Delete
  2. Maybe Sherly issue is due to simple text writing: Baretta maybe missed to say that you need to select "CurrentDate" and "CurrentTime" using the "insert reference" icon of Nintex, unless this references are not recognized.

    Hope this help, and thank you Baretta for this useful suggestion

    Cheers
    Michele

    ReplyDelete
  3. You can use the Action "Calculate date" and check "Use date when action is executed" and check "Include time".

    ReplyDelete

Post a Comment

Popular posts from this blog

SharePoint - Field type [FieldName] is not installed properly. Go to the list settings page to delete this field.

Export Group Membership From Active Directory Using Power Query

Office 365 Groups - Quickly find the GUID of a O365 Group