-
[JAVA] Date → String, String → Date1.개발/6.JAVA 2020. 6. 19. 14:45
Date → String
SimpleDateFormat dateType = new SimpleDateFormat("yyyyMMddHHmmss"); String testDateString = dateType.format(new Date());
String → Date
SimpleDateFormat dateType = new SimpleDateFormat("yyyyMMddHHmmss"); String testDateString = dateType.format(new Date());//Result : 20200619144500 Date testDate = dateType.parse(dateString);
'1.개발 > 6.JAVA' 카테고리의 다른 글
[JAVA] Date → String, String → Date (0) 2020.06.19 [JAVA] byte[] → HexString (0) 2020.05.28 [JAVA] int, long, short GetBytes() (0) 2020.04.29 [JAVA] String GetBytes (0) 2020.04.29 [JAVA] C# string.PadLeft() → JAVA String.format... (0) 2020.04.23 [JAVA] C# Buffer.BlockCopy() → JAVA System.arraycopy() (0) 2020.04.23