I have a time string which is 01:00:00
all I want to do is convert it to 1:00 am
using Javascript date time conversion.
I have tried SimpleDateFormat
which gives SimpleDateFormat is not defined
Following are the links i found but could not understand or implement:
I just want to understand how date and time formatting works in Javascript.
I already do it in java with SimpleDateFormat
, but i think it is not as easy in JS.
Please help. Thanks in Advance.
EDIT:
This link was suggested as a possible duplicate, but then the function in that answer accepts Date
object. I want to convert string time to Date
.