|
We are working on a project in which we use jsp and oracle as the database server. We insert records which has date field with the format `dd.MM.YYYY` but when we retrieve this information we get it `YYYY-MM-dd Hour:Min:Sec.0` format. When we try to update the records, we get an error message. It`s due to the mismatch of date formats but how can we change this secod format to our format when we retrieve but before we present for update?
|
|
|
Hi!!
Why dont u try this code in your java-file
public String getFormatDate(Date d_date) {
SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy");
String dateString = dateFormat.format(d_date);
return dateString;
}
|
|
|
|
|
|
|
|