{Created} timestamp = 00:00:00 in form Calculated Value


Badge +3

I'm trying to display a simple 'time remaining' calculated value /text box in a responsive Nintex form:

 

TIME REMAINING: 1:42

 

(1hr and 42 mins left for example)

 

The calculation is: {Created} + 48hrs - CurrentDateTime

 

My problem is that using the Item Property {Created} in a Calculated Value shows as "Thu Jun 4 00:00:00:00 UTC +0100" - always with the 00:00:00 time instead of the actual time created.  So I can't use that field as the Start Date to calculate the +48 hours from, but there's no other Created timestamp to use is there?  Why is it showing me the correct date but no time?

 

I can see the full {Created} field in the list item and it has an accurate date and time stamp as shown at the bottom of the list item form, but I can't get access to the actual time created using the {Created} field in the form calculation.

 

Any ideas please?


10 replies

Badge +8

Hi,

using this formula, I was able to correctly calculate the hour difference between created + 48 hrs and another given date. 8011iE0AEF5B5AF11AD6B.png
I did not find an easy way to get the current date time though. Current Date and Current Time are available, Current Date hovever comes with Time 00:00, so there is some replacing to do.

How do you calculate the current DateTime in your form?

 

 

Badge +3

Hi @Tarf,

 

I've got the current date/time stamp no problems by combining the {Current Date} and the {Current Time} variables.  The {Current Date} has the right date, but has 00:00:00 as the timestamp (like the blasted {Created} variable) and the {Current Time} only has the time.  I used this Nintex Forum post as the reference: How to compare current datetime to a datetime field on form.

 

My problem is that there's not two variables to be able to combine for the created date.  There's only the {Created} which gives me 00:00:00 as the timestamp.  Does your {Created} give you a specific time?

 

8012i125722B28E3A4284.png

For example, when I run this formula for adding 4 hours to {Created}, the result is always the same: 4am.  Because it's adding 4 hours to 00:00:00, not the actual time the record was created.

Badge +8

Hi @scrawford,

Created does come with a specfic time for me like this: 8015i1C957C0F48A1C43E.png

Have you tried with another list if its the same problem? Created should always contain both date and time.

Badge +3

Hi @Tarf,

 

Thanks for your help on this.  I've done some other testing.  I've found that if I use a label to display the {Created} variable it shows the actual time created.  However, I can't do the DateAdd calculations in a label so I'm using a Calculated Value box - and when I display just the {Created} field in the Calculated Value box it shows up with only the 00:00:00 as the time!

 

I'm using a responsive form and my plan was to use the form variables to calculate the countdown timer formula, then use the Calculated Value box to display it, although I'd rather use a label but that doesn't seem possible.

 

Do you know how I can display it without the Calculated value box wiping out the {Created} time value?

Badge +8

Hi @scrawford,

I don´t know, that kinda seems like a bug to me if the calculated value and label display two different values.
You could try wrappint the Created in a FormatDate("dd.MM.yyyy:hh:mm:ss") to maybe receive the correct result? 

Badge +3

Hi @Tarf,

 

That doesn't work unfortunately.  The zero timestamp 00:00:00 is just in a different format.

Badge +3

Hi @Tarf,

 

In one of your earlier replies, when you said you could correctly calculate the hour difference between created + 48 hours and another given date, what type of form control were you using?

  • Using a label I can't use the DateAddHours function or reference a form variable, and
  • Using a Calculated Value box I get the 00:00:00 {Created} timestamp issue...

 

What other options are there?

Badge +8

Hi @scrawford,

I used the calculated value control as it is displaying correctly for me.

I am running Nintex Forms 2013 (2.11.5.0)

What Forms Version are you using?

 

Maybe you find a hint on if it is a bug in your Version in the Release Notes? https://community.nintex.com/t5/Release-Notes/tkb-p/Release_Notes

Badge +3

Hi @Tarf,

 

Thanks for the link.

 

I'm using the latest version 2016 (4.5.2.0).

 

That's odd.  Is there anything else you have set like Save as data type or Recalculate formula on x mode to No etc?

Badge +8

Hi @scrawford,

unfortunately not, I just drag the calculated value in the form and set the formula. I even let it recalculate in new mode which results in an empty field. In Edit Mode the correct date shows with timestamp.  

Reply