Im trying to display the current time in a format like 7:45pm instead of 19:45 but i can’t seem to find the right format option.
Time cTime= new Time(Time.getCurrentTimezone());
cTime.setToNow();
clock.setText(cTime.format("%H:%M"));
This seems to display military
You’re using
Time.format(), so you can refer to the C++strftimedocumentation for formatting rules. Your format string should be%I:%M%Pfor 12-hour time.