title: Date display/formatting in ejs-express
body: <p>So, I have a mysql table and one column has date data. I am creating a webpage and I want to display my tables. The result (with the code below) is this:<br>
  <a href="https://i.stack.imgur.com/lGamr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lGamr.png" alt="enter image description here" /></a>
  <br> I want for the data in the column display, to be something like 1 January 2021 or just 01/01/2021 for example.
  <br>And my code:
  <br>
  <strong>passenger_index.ejs</strong></p>
  <pre><code>            &lt;table class=&quot;table table-dark table-striped&quot;&gt;
                  &lt;thead&gt;
                      &lt;tr&gt;
                          &lt;th&gt;Id&lt;/th&gt;
                          &lt;th&gt;Name&lt;/th&gt;
                          &lt;th&gt;Birthday&lt;/th&gt;
                          &lt;th&gt;Sex&lt;/th&gt;
                          &lt;th&gt;Email&lt;/th&gt;
                          &lt;th&gt;Phone&lt;/th&gt;
                          &lt;th&gt;Action&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/thead&gt;
                  &lt;tbody&gt;
                      &lt;% passengers.forEach(function(passenger){ %&gt;
                          &lt;tr&gt;
                              &lt;td&gt;
                                  &lt;%= passenger.passenger_id %&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                                  &lt;%= passenger.name %&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                                  &lt;%= passenger.birthday %&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                                  &lt;%= passenger.sex %&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                                  &lt;%= passenger.email %&gt;
                              &lt;/td&gt;
                              &lt;td&gt;
                                  &lt;%= passenger.phone %&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;% }); %&gt;
                  &lt;/tbody&gt;
              &lt;/table&gt;
  </code></pre>
  <p><strong>With this code, I execute my query</strong></p>
  <pre><code>exports.view = (req, res) =&gt; {
      let sql = &quot;SELECT * FROM passenger ORDER BY passenger_id&quot;;
      let query = connection.query(sql, (err, rows) =&gt; {
          if (err) throw err;
          res.render('passenger_index', {
              title: 'Passengers details',
              passengers: rows
          });
      });
  }
  </code></pre>