Convert time from 24 hours into 12 hours

#1

Hello

How are you
I’m beginning in ionic and I have this code and I want any way to convert it into 12 hours with am and pm

Is any one here will help please