Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Dear Umbraco Team
how can you change the 'updateDate' field to render date and time in UK format instead of the default US format on a view ?
Thanks Dibs
The format of the updateDate rendered is based on what language and culture you have set up for your site in Culture And Hostnames.
So if i write this line of code:
@CurrentPage.updateDate
And set my site culture to English (United States) it will render:
4/19/2016 1:05:43 PM
But if i change the language for my site to English (United Kingdom) it will render:
19/04/2016 13:05:43
Languages are set up in Settings, then right click on your home node and select the desired language. See image:
Best of luck to you!!
Or if you want you can just force the date to be en-GB in your view by:
@using System.Globalization @CurrentPage.updateDate.ToString(new CultureInfo("en-GB"))
Cheers Dennis
Glad i could be of help! Have a great day!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
updateDate field in us format
Dear Umbraco Team
how can you change the 'updateDate' field to render date and time in UK format instead of the default US format on a view ?
Thanks Dibs
The format of the updateDate rendered is based on what language and culture you have set up for your site in Culture And Hostnames.
So if i write this line of code:
And set my site culture to English (United States) it will render:
But if i change the language for my site to English (United Kingdom) it will render:
Languages are set up in Settings, then right click on your home node and select the desired language. See image:
Best of luck to you!!
Or if you want you can just force the date to be en-GB in your view by:
Cheers Dennis
Glad i could be of help! Have a great day!
is working on a reply...