Friday, March 9, 2018

Get seconds from Datetime field in Nintex workflow

I was trying to generate a document from Nintex workflow and name the document with values from current item including formatted Created datetime field.

When I try to use fn-FormatDate function, Nintex return 00 for "seconds" part of the time. Followed below approach to get the required format in 2 actions.

Action 1: Take Calculate Date action from Operations tab and configure as below. The action will store ISO format of Modified datetime in workflow variable varISODateTime


Action 2: Take Set Variable action from Operations tab and configure as below.

Title - fn-FormatDate(Modified, "MMMM dd HHmm")fn-Substring(varISODateTime,17,2).docx

The above formula is to generate document title as per my requirement. You may modify the format as per your requirement. fn-Substring(varISODateTime, 17, 2) is the part that extracts seconds part of the time.


Hope this helps you!

No comments:

Post a Comment