Edit in JSFiddle

<div>fsd<div>fsdkfjkldsf</div>kfjkldsf</div>
<div>fsdk<div>fsdkfjkldsf</div>fjkldsf</div>
<div>fsdkfjkl<div>fs{DATETIME}ldsf</div>dsf</div><div>fsdk<div>fsdkfjkldsf</div>fjkldsf<div>fsd<div>fsdk<div>fsdkfjkldsf</div>fjkldsf</div>kfjkldsf</div></div>

              
function replaceText(text, textToReplace) {

	function replace(nodes) {
  	nodes.forEach(node => {
      
      if (node instanceof HTMLScriptElement) {
      	return;
      }
      
      if (node instanceof HTMLStyleElement) {
      	return;
      }
      
    	if (node instanceof Text) {
      	if (node.nodeValue.match(text)) {
        	node.nodeValue = node.nodeValue.replace(text, textToReplace)
        }
      }
      else {
      	replace(Array.from(node.childNodes));
      }
    });
  }
  
  replace(Array.from(document.body.childNodes));
}

replaceText("{DATETIME}", "___WwW___");