You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am using Orchard Core to create my website and have added a DateTimeField to one of my content types (e.g., Article). The issue I am facing is with the format of the date being displayed. Currently, the date is rendered as DD-MM-YYYY HH:mm:ss, but I need it to be displayed as MM/YYYY for a specific time zone (e.g., India Standard Time).
I want to achieve this using the CMS only, without modifying code or creating custom Razor templates. Specifically, I want to:
Display the date in a simplified format like MM/YYYY.
Ensure it adjusts to a specific time zone, either globally (from General Settings) or per field.
Here are the steps I’ve already taken:
Enabled the Time Zone feature and set a default time zone under General Settings.
Tried using Liquid templates to customize the field's display, but my main challenge is to change format by CMS only.
My main questions are:
Can I assign a specific Liquid template to format the DateTimeField without writing custom code?
Is there a better approach to format the date while staying within the CMS features?
Any help or guidance would be greatly appreciated. Thank you!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am using Orchard Core to create my website and have added a DateTimeField to one of my content types (e.g., Article). The issue I am facing is with the format of the date being displayed. Currently, the date is rendered as DD-MM-YYYY HH:mm:ss, but I need it to be displayed as MM/YYYY for a specific time zone (e.g., India Standard Time).
I want to achieve this using the CMS only, without modifying code or creating custom Razor templates. Specifically, I want to:
Display the date in a simplified format like MM/YYYY.
Ensure it adjusts to a specific time zone, either globally (from General Settings) or per field.
Here are the steps I’ve already taken:
Enabled the Time Zone feature and set a default time zone under General Settings.
Tried using Liquid templates to customize the field's display, but my main challenge is to change format by CMS only.
My main questions are:
Can I assign a specific Liquid template to format the DateTimeField without writing custom code?
Is there a better approach to format the date while staying within the CMS features?
Any help or guidance would be greatly appreciated. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions