Search code examples
javascriptdatedatetimemomentjsdate-formatting

How can I remove year from my date with moment.js?


I am using MomentJS to display a date.

moment(startDate).format('lll')

This will display: Jan 29 2014 03:04

But I would like to remove the year which is "2014" how can I do that?

Here is the link to the momentjs

MomentJS


Solution

  • I haven't used that library before, but try this:

    moment(StartDate, "MMM DD HH:mm");
    

    At least this would work in .NET.