That's not much detail to go on. Where is the date data coming from? Are you using other script on the page? A library such as jQuery? A framework such as AngularJS or React? If not, is the page generated by JSP or some other templating system?
The high-level answer is to format the date as text, then insert the text into the proper location in the DOM. How you best do all that depends on the answers to the above questions.