After formatting a datetime, the time displays AM or PM in upper case, but I want it in lower case like am or pm.
This is my code:
public class Timei
just add toLowarCase() like this
toLowarCase()
public class Timeis { public static void main(String s[]) { long ts = 1022895271767L; String st = null; st = new SimpleDateFormat(" MMM d 'at' hh:mm a").format(ts).toLowerCase(); System.out.println("time is " + ts); } }
and toUpperCase() if you want upper case
toUpperCase()