124
Views
6
Comments
Solved
[OutSystems Data Grid] Datetime Format in a Datagrid
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive
Service Studio Version
11.54.48 (Build 63169)
Platform Version
11.26.0 (Build 41987)

Hello, 

I'm currently facing an issue with date on a datagrid. 

As you can see above I have a date column on the left, and a datetime column on the right.
I need to display the datetime column as dd-MM-yyyy hh:mm:ss but so far I can't find a way to achieve this and I'm a bit lost here. 
Would you have some hints on this topic ? 

Regards, 

UserImage.jpg
Vincent Perhirin
Solution

Well I think I just found was what wrong ... 
I was using a Date column to display a DateTime value !

2020-11-25 10-45-32
Mostafa Othman
Champion

Yes, this is the issue.

Actually I tried it many times with different formats and its working fine :)

I checked based on your explanation that you are using DateTime column but good news that is working now.

2022-01-13 11-06-04
Neha Sheikh
Champion

Hello,


Pls check this Link.

Thanks,

neha

2020-11-25 10-45-32
Mostafa Othman
Champion

Hello Vincent,

If you are using DateTimeColumn, you can set format as following


UserImage.jpg
Vincent Perhirin

Hi Mostafa, 
I already try this way, seems it doesn't have any effect

🤨 

Thanks for the idea !

UserImage.jpg
Usha Vilash

Before binding the data to the Data Grid, check that the datetime values are formatted as desired in your server-side logic or data preparation step. 

try this.

FormatDateTime(YourDateTimeAttribute, "dd-MM-yyyy hh:mm:ss")

On the other hand, you should check the MDN Doc.

UserImage.jpg
Vincent Perhirin
Solution

Well I think I just found was what wrong ... 
I was using a Date column to display a DateTime value !

2020-11-25 10-45-32
Mostafa Othman
Champion

Yes, this is the issue.

Actually I tried it many times with different formats and its working fine :)

I checked based on your explanation that you are using DateTime column but good news that is working now.

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