How can I go about formatting a date displayed to the user on a website? Basically, I am grabbing the date from a MySQL table and displaying on the website using Nunjucks.
MySQL Code:
CREATE TABLE IF NOT EXISTS `awards` (
`id` int(11) NOT NULL,
`awardtime` TIME,
`awardate` DATE,
HTML Code to display the date and time:
{{ results.awardtime }}
{{ results.awardate }}
Output:
Wed Nov 27 2019 00:00:00 GMT-0800 (PST)
Desired Output (Example):
11-20-2019