cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Date Format Conversion

Former Member
0 Kudos

Hi,

In my project i am picking the date from the date picker which is a javascript program . Then i am displaying it on a jsp page .It is coming in mm/dd/yyyy format .I have to change it to dd/mm/yyyy format .

I have the code for date formatting conversion .

What my doubt is whether the code should be written inside the jsp page or in the javascript .

Thanks .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

<%@page language="java" import="java.sql.*,java.util.*,java.text.*" %>
 
<%SimpleDateFormat sdf= new SimpleDateFormat(dd/mm/yyyy );%>
<% java.util.Date temp_date = sdf.parse(PassYourDateHere); %>

use this with your jsp

Regards

Abhijith YS

Answers (1)

Answers (1)

Former Member
0 Kudos

hi

I would suggest you to write the jave code in jsp page using <% %> tags

Thanks& Regards

Harsimran