I have a current format HH:mm:ss, but I want to convert it into dd:hh:mm. Is this possible in moment.js?
            Asked
            
        
        
            Active
            
        
            Viewed 1,225 times
        
    0
            
            
        - 
                    Refer the documentation you can figure out it easily – Prasad Apr 12 '16 at 04:53
- 
                    Possible duplicate of [Where can I find documentation on formatting a date in JavaScript?](http://stackoverflow.com/questions/1056728/where-can-i-find-documentation-on-formatting-a-date-in-javascript) – Martin Schneider Apr 12 '16 at 05:14
- 
                    Based on what I'm seeing, I feel like you don't have a date here, you have a duration. Note that moment can handle those as well, but it handles them differently. – Maggie Pint Apr 12 '16 at 14:36
1 Answers
1
            Try this,
var dateTime = new Date("2016-04-12 10:24:36");
dateTime = moment(dateTime).format("DD HH:mm");
 
    
    
        Prabhat Sinha
        
- 1,500
- 20
- 32
- 
                    Thanks @Prabhat for the answering. I'll look on to the docs more from now on. – freeman29 Apr 12 '16 at 06:08
