[OutSystems Data Grid] DateTimeColumn shows difference in date time in the grid
Application Type
Traditional Web

Hi,

I have a simple datagrid with two DateTime column (CreatedOn and UpdatedOn).

In the database the datetime is : 2022-07-18 07:57:00.000

In the datagrid it is shown as: 

How can I change the way DateTime columns are shown in the datagrid?

Solution

Hello,

So there is a difference in time zone you save your data, In Reactive or mobile apps  server date time converted to local date-time automatically. If you keep the same date time on the client-side between the server-side if you want to convert this, you have to convert date-time fields to text fields. to prevent auto converting function this way.(but i think this is not a best way)

The standard behaviour for reactive web apps to show datetime data in the timezone of client side(users device), and to store them in the timezone of the server. so this is normal.

You can check here we already have thread

https://www.outsystems.com/forums/discussion/73253/datetimecolumn-shows-two-hour-difference-ingrid/

https://www.outsystems.com/forums/discussion/75279/date-time-in-entity-and-ui-screen-different/

https://www.outsystems.com/forums/discussion/75279/date-time-in-entity-and-ui-screen-different/

https://www.outsystems.com/forums/discussion/69618/reactive-app-disable-showing-dates-in-client-timezone/


Thank you Tousif Khan , 

As per the my issue . We store the date (Convert the date into Pacific Time ) so it was 2022-07-18 07:57:00.000 but when we displaying it into the grid it was different. 

The solution you provide was to convert the format of date and time. 


Solution

Hello,

So there is a difference in time zone you save your data, In Reactive or mobile apps  server date time converted to local date-time automatically. If you keep the same date time on the client-side between the server-side if you want to convert this, you have to convert date-time fields to text fields. to prevent auto converting function this way.(but i think this is not a best way)

The standard behaviour for reactive web apps to show datetime data in the timezone of client side(users device), and to store them in the timezone of the server. so this is normal.

You can check here we already have thread

https://www.outsystems.com/forums/discussion/73253/datetimecolumn-shows-two-hour-difference-ingrid/

https://www.outsystems.com/forums/discussion/75279/date-time-in-entity-and-ui-screen-different/

https://www.outsystems.com/forums/discussion/75279/date-time-in-entity-and-ui-screen-different/

https://www.outsystems.com/forums/discussion/69618/reactive-app-disable-showing-dates-in-client-timezone/



Thank you , 

Tousif Khan
Updated the filed as text it working as per the requirement. But it's not allow me to apply the filter. 

 Glad to help you :)

 Kind regards,

 Tousif khan


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.