I'm using moment.js to format a datetime value as follows:
time = moment(this.params['timeValue']).format("HHmmss.SSS")
Here, this.params['timeValue'] is a string. An example value is 2020-02-05 10:00:00.123 . formatting using moment returns the value 100000.123. Sometimes my datetime value goes to microsecond value, but moment js seems to cut the formatted value to millisecond level. For example formatting 2020-02-05 10:00:00.123456 returns 100000.123. I've tried this, but it did not work:
time = moment(this.params['timeValue']).format("HHmmss.SSSSSS")
Could you help me how to handle the formatting of a datetime value with microseconds. If moment.js doesn't handle it, is there any other library I could use?