Quantcast
Channel: SCN : Popular Discussions - Java Development
Viewing all articles
Browse latest Browse all 518

How to convert string yyyy-mm-dd to date dd/mm/yyyy

$
0
0

Hi Experts,

 

I am getting date in the form of string 2007-06-30 from R/3. How I can convert this string into a date in the form 30/06/2007. I have to use java.sql.Date.

 

Following code is not working. As for executing the following code, I have to use java.util.date. I can not use java.util.date as the Web Dynpro program uses java.sql.Date.

 

     SimpleDateFormat sdf1 = new SimpleDateFormat("dd/mm/yyyy");     Date d = null;     d = sdf1.parse(wdContext.currentContextElement().getDateClicked());

 

Regards,

Gary


Viewing all articles
Browse latest Browse all 518

Trending Articles