How to change the month name to uppercase. Anyone know about this?
This is my example condition:
(new SimpleDateFormat("MMMM yyyy")).format($P{date_start})
Java SimpleDateFormat with Locale String pattern = "EEEEE MMMMM yyyy HH:mm:ss.
The formats are case-sensitive. Use yyyy for year, dd for day of month and MM for month. You need to read the javadoc of SimpleDateFormat more carefully, Take special care for lower-case and upper-case in the patterns.
SimpleDateFormat also supports localized date and time pattern strings. In these strings, the pattern letters described above may be replaced with other, locale dependent, pattern letters. SimpleDateFormat does not deal with the localization of text other than the pattern letters; that's up to the client of the class.
SimpleDateFormat is a concrete class for formatting and parsing dates in a locale-sensitive manner. It allows for formatting (date -> text), parsing (text -> date), and normalization. SimpleDateFormat allows you to start by choosing any user-defined patterns for date-time formatting.
Use .toUpperCase()
, as follows:
(new SimpleDateFormat("MMMM yyyy")).format($P{date_start}).toString().toUpperCase()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With