Skip to main content

Hello,

I have a question about displaying datetime strings in the Universal GUI.

I’m using a domain with datetime control with option “Show as stored”, which is exactly what I want in my case. Furthermore, I know that the actual string format which is displayed to the users is dependent on the browser settings. For example, for Dutch I see the following: “DD-MM-YYYY HH:MM:SS”.

Now I created a NVARCHAR column in a table with HTML control. In this HTML I want to show a datetime in the same format as the other columns (dependent on the browser settings). Is this something that can be achieved?

Another usecase has a similar requirement: to show a datetime range in the following format <DATETIME_START> - <DATETIME_END>. For both timestamps I want to use the browser settings for displaying the datetime string.

Any recommendation on achieving this? Thanks in advance!

Hi ​@NickJanssen,

 

Now I created a NVARCHAR column in a table with HTML control. In this HTML I want to show a datetime in the same format as the other columns (dependent on the browser settings). Is this something that can be achieved?

The user interface won't be handling this automatically, as it doesn't know what format the original datetime is in inside of the HTML. The HTML control is meant for just rich text formatting, it doesn't have localization features. For some more context, what are you trying to implement?

 

Another usecase has a similar requirement: to show a datetime range in the following format <DATETIME_START> - <DATETIME_END>. For both timestamps I want to use the browser settings for displaying the datetime string.

You can create a column “start_date” and another column “end_date” and for example make them influence each others values (so that when increasing the start_date with 5 days, the end_date also gets increased with 5 days) using a default procedure. If you need more specifics for your use case, please let me know.

Kind regards,
Leroy Witteveen


Reply