To get the full date with time you can use the below code. You can pass any date that you wan to change, I'm getting date in full date format in the below example:
/**
* Get full month day year format from Date
*
* @param createDate
* @return
*/
public static String getFullDateFormat(Date createDate)
{
SimpleDateFormat simple = new SimpleDateFormat();
simple.applyPattern("MMMMMMMMM dd yyyy hh:mm:ss a");
return simple.format(createDate);
}
Hope this will help you :)
0 Comment(s)