Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lazau Florin 74 posts 210 karma points
    Apr 12, 2017 @ 15:59
    Lazau Florin
    0

    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

  • Jamie Pollock 174 posts 853 karma points c-trib
    Apr 12, 2017 @ 17:05
    Jamie Pollock
    0

    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() and System.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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies