Saving Date Time format into Smartobject not keeping formatting


Userlevel 3
Badge +16

Hi,

 

Got a Data Label formatted to special as dd/MM/yyyy hh:mm tt - this works great and i displays ok.

 

In my initialize rule, i transfer the system time and data to this date data label

 

Further in my rules i do a save method and save some TEXT + date data label to ONE single Memo field in the Smartobject.

 

However, when i'm checking the Memo field in the smartobject, its not saving the Date as a formatted it, its showing this:

 

With the A Team 20*personal details removed*:05:48Z

 

It should say "With the A Team 04/04/20*personal details removed*:05 PM

 

Any ideas?


2 replies

Badge +12

Hi,

I am assuming you are using the Style property to set the format of the data label. You could try using an Expression instead:




You'd need to:
- Remove the Style set on the data label
- Remove the action which transfers the current date and time system value on form initialize

This expression should format the date time value as designed on runtime and when the value is saved in your database. 



Hope this helps.

Userlevel 3
Badge +16

Hi Ajo,

 

Thanks for the reply.

 

I did try the expression, however the expression only works on when the form is loaded. When i go to save it only saved the time the form was loaded.

I want to save the text and time when the form is submitted.

 

The only workaround i came up with was two data labels, so when submitting, one rule does the transfer of the system time to the date data label.

Then i have the expression on the other data label which uses the Date data label as it's format date expression. i then save this data label to the smartobject and appears correctly formatted and has the right time.

 

Seems to work, but some extra steps to achieve this.

Reply