17. What is the use of the 'SimpleDateFormat' and how can you use it to display ?

toutbon·2024년 3월 11일
0

Simple Date Format

  • format and parse dates in local sensitive manner
    - 한국은 2024-01-01 인데 호주는 01-01-20204 이런식 (일/월/년)
  • 날짜를 커스텀해 변형 가능

Date & Time Patterns

  • y, M, d를 많이 쓴다
  • H :24기준, h: 12기준
  • 이런 패턴은 기억에 의존하기보다, 오라클 공식문서를 그때그때 찾아보자!

Example

  • Date -> String : format() method
  • String -> Date : parse() method

Keyword Check

  • flexible date & time format
  • using standard pattern
  • format() & parse() methods
profile
뚜봉

0개의 댓글