XF 2.2 Date time format

Andy.N

Well-known member
I have the user enter this date 3/5/2024 and I use this two formats in template resulting in different date. Can anyone give me quick hint on how to format to show correct format?

<dd>{$application.AppFields.date_submitted.value}</dd> ==> this shows 2024-03-05. I need this to show as 3/5/2024
<dd>{$appFieldDateSubmitted.getFormattedFieldValue(templater())}</dd> ==> this shows 3/4/2024
 
Just for my note. This is the solution
<dd>{{ date(date_from_format("Y-m-d", $application.AppFields.date_received.value), 'm/d/Y') }} </dd>

It will show 03/05/2024. Anyone knows how to remove the 0 before the month/date?
 
Top Bottom