You need to explicitly specify the format.
Try this:
momentDate.format('YYYY-MM-DDTHH:mm:ss')
this will give the result as
2015-10-01T15:40:00
You need to explicitly specify the format.
Try this:
momentDate.format('YYYY-MM-DDTHH:mm:ss')
this will give the result as
2015-10-01T15:40:00