I have a code in java to generate a sitemap xml, and to get the last modified date using the following line of code:
oPrint.println(" <lastmod>"+ doc.getLastModified().toString()+"</lastmod>");
The output in the browser when calling the xml file is
<lastmod>23/05/2014 16:48:24 ZE4</lastmod> which is in "dd/mm/yyyy"format.
However, from this link, https://support.google.com/webmasters/answer/183668?hl=en#183668, it states that the format has to be in YYYY-MM-DD format.
How can I convert my current output to the Google one?