Skip to main content

Hi,

 

I'm using the SAVE method to capture the date and time in two seperate data labels.

 

I firstly apply styles to show the LONG DATE style in one data label and the SHORT TIME style in the other data label.

 

The form displays them in the correct format, however when i do the SAVE method, it is saving it as the original DATE format without the style, how can i get round this?

 

Form display is correct:

14028iC9395D744906A6C7.jpg

 

Save Method in SQL table shows as: 11660i6042A01DE58C5EF8.jpg

 

It isn't saving the applied STYLE contents, just the system variable DATE and TIME

 

Anyone suggest a workaround?

Hi,


 


The styling would apply the specified format of the date during runtime, I don't think that the actual saving of the date would be formatted, as the SmartObject created the date in that specific format. My suggestion would be to try and create a table in SQL whereby you could specify the format of the date upon creation of the table itself, create a SQL Service Instance for that table and generate a new SmartObject from there. I am not completely sure that would work, as I have stated it is only a suggestion.


 


Regards,


Taariq


If the style is applied at runtime, is there any way of doing a data transfer of the styled date and time when a button is clicked on the form afterwards?


K2 date controls will always give you that long zulu date/time.  When you format it...it's just for looks, it will always submit the zulu.

 

Create a rule on the calendar that when it's changed to transfer the data to a data label, and use the data label as the variable that you upload your date and time with.


Hi Zulu Dave,

 

I don't use the calendar, the time and date is stamped on the form. 

I simply use the system variable DATE and TIME on two data labels and then apply the styling.

 

I have tried your suggestion to transfer those values into other data labels, but again it just copies the zulu format.


Ok, if thit is transfering the long date/time zulu then it might not be possible to even formate a new control with a US type date. 

 

You will have to go with the earlier suggestion of formatting it on the backend.


Reply