Formatting date to unix timestamp in milliseconds with Moment.js returns format string
<p>I'm aware there are lots of questions here asking similar, but having looked through the answers I seem to be getting unexpected results.</p>

<p>I have a full date and I need to convert it to a unix timestamp in <strong>milliseconds</strong></p>

<p>The date is in full format: <code>Tue Dec 06 2016 10:51:47 GMT+0000 (GMT)</code></p>

<p>If I try to format it using the <code>x</code> identifier for unix milliseconds (shown in the documentation) I literally just get the string <code>"x"</code> back</p>

<p><code>moment(date).format('x') // = x</code> </p>

<p>What am I doing wrong here? Do I need to convert <code>date</code> into something other than the full format before I do this? Why does passing the argument to <code>format()</code> just return me back the format I typed in there?</p>