Date format outputs seconds as 00

  • 18 October 2016
  • 6 replies
  • 13 views

Badge +5

I'm using Nintex Workflow to output the current time to the Title field. I'm using the inline function FormatDate to produce a time string of hours, minutes and seconds as below:

fn-FormatDate(Current Time,HHmmss)

193340_pastedImage_1.png

However the seconds are always output as 00 e.g.: 175200

Am I missing something?


6 replies

Badge +9

Hi,

Please check the post at

https://community.nintex.com/community/build-your-own/blog/2015/08/11/date-and-time-format-strings-quick-reference-guide.

Try if "T" is giving you the result in seconds

Badge +5

Hi,

Thanks. Yes using "T" produces the same result: 14:19:00

Badge +9

can u try javascript to check the time date related settings are proper? check the link https://community.nintex.com/thread/4800 

Userlevel 5
Badge +14

I agree with Aditya, that it would be easier to get datetime value with seconds precision in forms with some javavascript.

if you insist of doing that in workflow then only possible way I'm aware of is getting current time in ISO format. that's only datetime format in worklow with seconds precision.

you can do it like that

you will get an output like: 2016-10-19T10:32:18Z

you will need then to parse it for respective time parts with eg. regular expression

Badge +5

Thank you Marian! The Calculate Date action produces the seconds: 2016-10-19T10:52:53Z

EDIT: For additional information:

  • Configure the Calculate Date to output the ISO time to a text variable (varTXTDate):

193351_pastedImage_1.png

  • In the next action I use an inline function to format the text variable:

fn-FormatDate(varTXTDate,yyyyMMddHHmmss)

193409_pastedImage_2.png

Badge +5

Thanks for your assistance Aditya! Marian's solution worked for me.

Reply