Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I would like to insert a date field that updates automatically every day. Also in the format dd-mm-yyyy. |
||||
|
You can add this from Codepen site. https://codepen.io/JoseffMoro/pen/NMNMZv HTML: <html> <head> <font color="000000" face="Vollkorn, Arial" size="3"><strong><title>date</title> <script type="text/javascript" src="code.js"> </script> </head> <body> </body> </html> JS: var dateNow = new Date(); function dateFormat(date) { var year = date.getFullYear(); var month = date.getMonth(); month = month + 1; if(month < 10) { month = "0" + month; } var day = date.getDate(); if(day < 10) { day = "0" + day; } return day + "/" + month + "/" + year; } document.write(dateFormat(dateNow)); In the HTML you can add this code to increase the font size and color: after the Head in html. I'll place it there for you. <font color="000000" face="Vollkorn, Arial" size="3"><strong> |
||||
|
Thanks. I've played around with it a bit now. It works as desired. |
|