hi all~
today i faced dateformat display.
anyone knows how to retrieve only 3 string month, such as Jan, Feb, Mar, Apr, so on...
If i have 2001-01-01 00:00:00 this date, how can I format this to display only month.
Thx all~
If the dDate object is set as you've given above, then strMonth will contain "Jan". A full description of the format codes is given in the Java API Specification, package java.text, class SimpleDateFormat.
If your original date was stored in a string not a Date, then it can be converted into a Date using SimpleDateFormat.parse( strDate ) - using a different SimpleDateFormat object created with a different format string.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.