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
Hi,
I have tried to create a partial view (Nested Content) like this:
var items = Model.Value<IEnumerable<IPublishedElement>>("Test"); foreach(var item in items) { <p>@item.Value("head")</p> <p>Sidst redigeret: @item.Value("date")</p> <p>@item.Value("body")</p> }
But I can not figure out how to format the "date" to d. MMMM YYYY
Found this in the forum:
@(Model.Value<DateTime>("datePicker").ToString("dd MM yyyy"))
But @item.Value<DateTime>("date").ToString("d. MMMM YYYY")) - returns this error: Argument 1: cannot convert from 'method group' to 'HelperResult''
@item.Value<DateTime>("date").ToString("d. MMMM YYYY"))
Any idea how to solve this?
Solved:
https://our.umbraco.com/forum/umbraco-8/96993-having-trouble-rendering-a-date-in-umbraco-8
is working on a reply...
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.
Continue discussion
Nested Content with datepicker - can not format date in view
Hi,
I have tried to create a partial view (Nested Content) like this:
But I can not figure out how to format the "date" to d. MMMM YYYY
Found this in the forum:
@(Model.Value<DateTime>("datePicker").ToString("dd MM yyyy"))
But
@item.Value<DateTime>("date").ToString("d. MMMM YYYY"))
- returns this error: Argument 1: cannot convert from 'method group' to 'HelperResult''Any idea how to solve this?
Solved:
https://our.umbraco.com/forum/umbraco-8/96993-having-trouble-rendering-a-date-in-umbraco-8
is working on a reply...
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.