Skip to content

Extract time from moment js object

How do i extract the time using moment.js?


It should return “12:00:00 pm”. The string return will be passed to the timepicker control below.

Any idea?


If you read the docs ( you can find this format:

moment("2015-01-16T12:00:00").format("hh:mm:ss a")

See JS Fiddle