Filter toDateTime missing in templates

Hello

Is it correct that a conversion toDateTime is missing in the filters?

I’ve got a string value “2018-02-13T14:00:00” that I want to format as “13 Feb 2018”

Any alternative?

Thanks
Marco

Yeah it automatically coerces strings into DateTime when you use dateFormat, e.g:

{{ "2018-02-13T14:00:00" | dateFormat('dd MMM yyyy') }}

Should display:

13 Feb 2018
1 Like

FYI I’ve also added toDateTime and toTimeSpan in this commit which is available from v5.0.3 that’s now available on MyGet.

1 Like