DateFormat String format


Parse LocalDateTime to String to pattern 

year :                      yyyy || 2021

month of year:       M / MMM / MMMM || 06 / Jun / June

day of week:          E || Sat

day of week full:    EEEE || Saturday

day of month:         dd || 12 day

day of year:            DDD || 163 day

hour (Am/Pm) :      hh || 09 hour

get Am/Pm:            a || AM or PM

hour (0-23):            HH || 21 day

minute of hour:       mm || 54 minute

seconds of minutes: ss || 54 seconds

miliseconds:            SSS || 664 miliseconds

nanoseconds:           n || 664256400 miliseconds




Source code:

https://github.com/nguyenthinhit996/sharefullcode/blob/java/Learn%20Java/Java%20Basic/DateTime/src/datetimedemo/ExpandDateFormat.java

 

0 comments :

Post a Comment

Cancel Reply

About Me

My photo
Tân An, Long An, Vietnam
Hello everyone, I love programming, I love making friends with people all over the world.