I would like to know how to have different DateTime formats in different applications (in the same environment), without having to individually in all eSpaces apply the appropriate changes.


Ex:

Application A: MM-DD-AA

Application B: DD-MM-AA

Hi Daianne,

You have a function called FormatDateTime() within the platform. My suggestion would be to create a Site Property for each application, and in it, define the format of the date (you can look at the input in the FormatDateTime function for examples). Then, when you need to display your DateTimes, you call the function and access the Site Property for your format. Something like

FormatDateTime(MyDate, Site.DateFormat)

This way, you can change formats for applications on the fly by changing the value of each Site Property, and changes will be propagated to users the next time they load the page.

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Use_Site_Properties_to_Configure_Behaviors_at_Runtime

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Logic/Built-in_Functions/Format#FormatDateTime

Hello Daianne


Check the Service center


Regards

Ok. I didnt full understand the question. The suggestion Afonso it's must direct to your problem 

Afonso Carvalho wrote:

Hi Daianne,

You have a function called FormatDateTime() within the platform. My suggestion would be to create a Site Property for each application, and in it, define the format of the date (you can look at the input in the FormatDateTime function for examples). Then, when you need to display your DateTimes, you call the function and access the Site Property for your format. Something like

FormatDateTime(MyDate, Site.DateFormat)

This way, you can change formats for applications on the fly by changing the value of each Site Property, and changes will be propagated to users the next time they load the page.

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Use_Site_Properties_to_Configure_Behaviors_at_Runtime

https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Logic/Built-in_Functions/Format#FormatDateTime

Hello more to do this, I will have to do in all fields of my systems.


Yes, you'll have to do it for every Date field that you present in every application. Alberto pointed you to the Date Format field in the ServiceCenter, but it is a Global setting: it will affect all of your applications, and there is no way to change this behaviour.

If you want different applications to have independent settings and display Dates in a different way depending on your configuration, I believe my suggestion is the simplest way to do it.

Afonso Carvalho wrote:

Yes, you'll have to do it for every Date field that you present in every application. Alberto pointed you to the Date Format field in the ServiceCenter, but it is a Global setting: it will affect all of your applications, and there is no way to change this behaviour.

If you want different applications to have independent settings and display Dates in a different way depending on your configuration, I believe my suggestion is the simplest way to do it.

Could you tell me if within Outsystems I can do zones with different time patterns?

Not to my knowledge. Those environment configuration settings would be applied to every zone. Unless you are willing to completely separate those applications by environment, I don't see another solution besides changing the presentation of every Date field.