cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Change the date time format

rk-31
7-Bedrock

Change the date time format

Hi,

Currently I have a property of datetime type. I am getting date in below format.

example: 2016-07-22 13:55:45.773

I want to change the above date to 07-22-2016 01:55:45 PM.

Aanjan RaviPai Chung

Thanks

Raju

3 REPLIES 3
Aanjan
12-Amethyst
(To:rk-31)

Raju, the way timestamps are rendered is controlled by Localization Tables. Navigate to the Localization Tables section and open the Default table. The token 'dateTimeFormat_Default' controls how time is rendered. The default value is 'yyyy-MM-dd HH:mm:ss.SSS'. If you change that to 'yyyy-MM-dd HH:mm:ssA', it will display your time with AM/PM.

rk-31
7-Bedrock
(To:Aanjan)

Thanks Ravi. It's working.

But In my application datetime needs render in different formats in different places . So any way to handle in code level ?

Thanks

Raju

Aanjan
12-Amethyst
(To:rk-31)

I don't think you can; unless you use different languages. You could have the default language with the default timestamps and language1 with AM/PM and show that specific language depending on which user logs in.

Announcements


Top Tags