Hi
How to convert the Date field in my velocity template that came after the ajax request from "dec 1, 2018" to "01.12.2018"?
Thanks.
You should create two variables of SimpleDateFormat and use it for date conversion. Here is code example:
import java.text.SimpleDateFormatSimpleDateFormat inputFormat = new SimpleDateFormat("MMM dd, yyyy", Locale.ENGLISH)SimpleDateFormat outputFormat = new SimpleDateFormat("dd.MMMMM.yyyy", Locale.ENGLISH)outputFormat.format(inputFormat.parse("Dec 01, 2018"))
It looks like you're new here. Sign in or register to get started.