Hieu Le
Hieu Le

Reputation: 1132

Time format in momentjs that has number of day prefix

How can we use momentjs for a time format that has a number of day part prefix? We can use:

moment("19:41:00", "HH:mm:ss");

What is the time format for:

28.19:41:00

Thanks for helping.

Upvotes: 0

Views: 236

Answers (1)

Mahdad
Mahdad

Reputation: 828

let date = this.moment("28.19:41:00", "DD.HH:mm:ss");
console.log(date.format("YYYY/MM/DD HH:mm:ss"));      // 2019/12/28 19:41:00
console.log(date.format("HH:mm:ss"));                 // 19:41:00

Upvotes: 2

Related Questions