Display Short Date on Form

  • 2 August 2016
  • 3 replies
  • 7 views

Badge +6

I'm trying to auto-calculate date (depending on PRIORITY) and display the outcome on the form as short date. The formula dateAddDays(Current Date, 2) works fine but displays long date on the form as shown below.

188993_pastedImage_0.png

How do i format the output? Can I do this with native Nintex functionality, without having to use custom JavaScript?


3 replies

Userlevel 5
Badge +14

have a look on formatDate() function

Badge +6

Bu i already have this formula, how do I add the formatDate() function here?

If(Priority == 1, dateAddDays(Current Date, 2), If(Priority == 2, dateAddDays(Current Date, 5), If(Priority == 3, dateAddDays(Current Date, 10), dateAddDays(Current Date, 15)))

Userlevel 5
Badge +14

I think you have 3 possibilities:

1. you can place your whole formula as a formatDate() parameter. this might be hardly understandable and/or maintainable but it should work.

2. you can leave it as it is within existing calculated value control and you might hide the control from users. then add one another calc. value control where you will set up formatDate() formula which will use former calc. control as an input value.

3. you can create a form variable and your formula into this form variable. then define calc. value control formula similar way as in point 2, just use form variable as an input value. this might be beneficial if you need to deadline calculation on different places resp. in different formulas (eg in. rules)

Reply