I'm searching a way to format all the datetimes ( For rollback drop down I have to do this immediately, but I would like to have all the datetimes formatted in a US standard all the time) from Umbraco backoffice to this format: month/day/year, 12-hour clock am/pm
Umbraco backoffice date dormat
Hi team,
I'm searching a way to format all the datetimes ( For rollback drop down I have to do this immediately, but I would like to have all the datetimes formatted in a US standard all the time) from Umbraco backoffice to this format: month/day/year, 12-hour clock am/pm
Can you advise me?
Many thanks, Florin
Hey Florin,
I'm afraid this part of the CMS can not be modified in that fashion.
The datetimes in this view are set here: https://github.com/umbraco/Umbraco-CMS/blob/5397f2c53acbdeb0805e1fe39fda938f571d295a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs
Using
System.DateTime.ToShortDateString()
andSystem.DateTime.ToLongDateTime()
. Which does take the app culture info into effect.That being said, with en-US culture the result wouldn't produce the format you're looking for.
A bit more further reading on ToLongDateString() and ToShortDateString():
Thanks,
Jamie
is working on a reply...