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
My list of events contain this
<p class="item_date">@Umbraco.Field(item, "eventDate")</p>
Which results in this
<p class="item_date">3/9/2019 12:00:00 AM</p>
I would prefer this
<p class="item_date">9 MAR 2019</p>
Suppose I need to add this
.ToString("dd MMM yyyy")
But I can't seem to figure out where.
Suggestions? Other solutions?
Best
Hi Jesper
Try this code:
<p class="item_date">@(Umbraco.AssignedContentItem.GetPropertyValue<DateTime>("eventDate").ToString("dd MMM yyyy"))</p>
Thanks
Alex
Hi,
You can probably do the following
@Convert.ToDateTime(Umbraco.Field(item, "eventDate").ToString()).ToString("dd MMM yyyy")
or
@CurrentPage.eventDate.ToString("dd MMM yyyy")
Regards, Tan
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
@Umbraco.Field(item, "eventDate")
My list of events contain this
Which results in this
I would prefer this
Suppose I need to add this
But I can't seem to figure out where.
Suggestions? Other solutions?
Best
Hi Jesper
Try this code:
Thanks
Alex
Hi,
You can probably do the following
@Convert.ToDateTime(Umbraco.Field(item, "eventDate").ToString()).ToString("dd MMM yyyy")
or
@CurrentPage.eventDate.ToString("dd MMM yyyy")
Regards, Tan
is working on a reply...