Last active
August 29, 2015 13:55
-
-
Save jgcasta/8781116 to your computer and use it in GitHub Desktop.
Return a String date with format dd-MM-yyyy from a XMLGregorianCalendar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Return a String date with format dd-MM-yyyy from a XMLGregorianCalendar | |
* | |
* @param cal | |
* @return | |
*/ | |
public String XmlGregorianCalendar2String(XMLGregorianCalendar cal){ | |
String str = ""; | |
SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy"); | |
str = format.format(cal.toGregorianCalendar().getTime()); | |
return str; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment