I have the following code on one of my pages and it works fine
@foreach (var item in menuItems){
var tempMonth = item.GetProperty("eventDateStart").Value;
<div class="event-single">
<a href="@item.Url">@string.Format("{0:dd MMM yyyy}", @tempMonth)</a>
</div>
}
On another page I am using Concat to combine to selections into my menuItems and when I use the same code (minus the .Value) the resulting is displayed:
Umbraco.Core.Dynamics.PropertyResult
If I just use @tempMonth within my <a> tags I get a dd/mm/yyyy hh:mm:ss result.
Can anybody guide me as to what the correct code should be?
Simple date formatting
I have the following code on one of my pages and it works fine
On another page I am using Concat to combine to selections into my menuItems and when I use the same code (minus the .Value) the resulting is displayed:
Umbraco.Core.Dynamics.PropertyResult
If I just use @tempMonth within my <a> tags I get a dd/mm/yyyy hh:mm:ss result.
Can anybody guide me as to what the correct code should be?
Solved this so please ignore - delete function did not work
is working on a reply...