You can use DateFormat Class and this static method will convert it to lower am pm
Calendar calendar = Calendar.getInstance(); String inFormat = "d MMM yyyy,h:mm aa"; String dateString = DateFormat.format(inFormat, calendar).toString();
By converting the string to lowercase (which you do), your month will also be converted to lowercase, suppose your month is July , then it will be converted to July . I think you can use the above method to convert specifically only am_pm to lowercase
source share