I tried moment.time(column.start_time).format("hh:mm A"), but he gave me an error.
moment.time(column.start_time).format("hh:mm A")
I have a time field value in the "15:30:00" field that needs to be formatted as "03:30 PM".
You need to add the format string to the function momentbecause your date is not a valid ISO date.
moment
var time = "15:30:00"; var formatted = moment(time, "HH:mm:ss").format("hh:mm A"); console.log(formatted);
<script src="https://momentjs.com/downloads/moment.min.js"></script>
Source: https://habr.com/ru/post/1659688/More articles:Why does the implementation of Microsoft std :: string require 40 bytes in the stack? - c ++Graphic dots / circles on google map using python - python-2.7How to set a style attribute to fill the space for relaxation? - flexboxHow to create multiple roles for a single user in ruby on rails? - ruby | fooobar.comNews DataSet - datasetВыполнение тестов Mocha в браузере - javascriptAccessing PCI-e memory with mmap - linuxJBoss Developer Studio 9.1.0 FUSE CXF project always gives maven error - javaException handling with lambda expression - javaEnable all dependencies using the dotnet package - asp.net-coreAll Articles