I've added the umbracoMemberLastLogin date as a column on a member. How can I format how this date appears to the user?
I assume its using the template field, but I can't find any reference to the correct syntax.
For anyone else that comes across this thread when searching here is the template you need to use, replacing the formatting string with what you require.
This was exactly what I was looking for! I'll try and find time to create a PR to the new docs so others are aware of how to format dates.
Did you find out how to handle empty values (maybe a node doesn't implment the field, for example). I'd like to show something else conditionally if so.
Formatting date in List View Template?
I've added the umbracoMemberLastLogin date as a column on a member. How can I format how this date appears to the user? I assume its using the template field, but I can't find any reference to the correct syntax.
Thanks
Did you find a solution to this? Having the same problem. 😊
Anyone has solution for this? Please help. 😊
For anyone else that comes across this thread when searching here is the template you need to use, replacing the formatting string with what you require.
This was exactly what I was looking for! I'll try and find time to create a PR to the new docs so others are aware of how to format dates.
Did you find out how to handle empty values (maybe a node doesn't implment the field, for example). I'd like to show something else conditionally if so.
This doesn't appear to be working in Umbraco v13. Does anyone know if there is a new way to format dates via the list view template field?
Work to me as well in a project on Umbraco 12. However since the date isn't mandatory I modified the template:
Otherwise one will get "Invalid date" at the items missing a date value.
is working on a reply...