pbaris
(Panos Bariamis)
March 12, 2024, 2:54pm
1
I have a ftl template in reports and i want to format a LocalDateTime field.
I tried GitHub - lazee/freemarker-java-8: Library that adds java.time support to FreeMarker templates. · GitHub , but with no luck.
As i can see reports addon does not use spring-boot-freemarker.
Any idea?
pbaris
(Panos Bariamis)
March 14, 2024, 9:57am
3
What i did was
<#assign date = createdDate.withSecond(0).withNano(0)?string?datetime(“yyyy-MM-dd’T’HH:mm”)?string[“dd/MM/yyyy, HH:mm”]>
any better solution is welcome.
mekop32664
(Youssef Nomatter)
June 19, 2024, 2:49pm
5
You can utilize the basic format createdDate?datetime("uuuu-MM-dd'T'HH:mm:ss") to obtain the “FreeMarker date”, and then apply FreeMarker functions to customize the date according to your preferences.