How to Convert Date Formats in the OAF Controller : Change the Date format from (DD/MM/YYY) To (DD-MON-YYYY)
In this post , We will discuss about How to Convert Date Formats in the OAF Controller. When we are doing development in the OAF , then we often need or requirement to change the formats of the Date. For example in this case I am trying to change the Date format from (DD/MM/YYY) To (DD-MON-YYYY). Here below I will share the sample OAF controller code for How to Convert Date Formats in the OAF Controller .
How to Convert Date Formats in the OAF Controller : Change the Date format from (DD/MM/YYY) To (DD-MON-YYYY)
String PDate =(String)pageContext.getSessionValue("JoiningDate");
try
{
DateFormat formatter;
formatter = new SimpleDateFormat("DD-MON-YYYY");
Date ChangePDate = formatter.parse(PDate);
}
Catch(ParseException e)
{
throw new IllegalArgumentException("Error in Converting date Format"+e);
}
How to Convert Date Formats in the OAF Controller
0 comments:
Post a Comment