here i am getting a time value as 1700
. I want to convert this into a format like this 5pm
. I tried to do this with moment
package. It has a lot of options, I'm not able to find the relevant format to achieve the output I am looking for.
Result has to be something like this:
1700 -> 5pm
0900 -> 9am
Current impl of mine is
moment("1500", "hh").format('LT') => 3:00 PM
Here the output is different, it has to be like 3pm.
Is there any way I can achieve this. Help me with your suggestions and feedback