Created
September 20, 2011 11:56
-
-
Save pkozelka/1228934 to your computer and use it in GitHub Desktop.
convert Date into ISO-formatted string
This file contains hidden or 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
class DateToIso { | |
/** | |
* This uses java formatter for the conversion | |
*/ | |
public String toString(Date date) { | |
return String.format("%tFT%<tT.%<tL", date); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment