Can we get more of the html mark up in this example. I have two questions, first is in the example i don't actually see an element with the id="ScanDate" so i'm not sure what you would find if that attribute is not on the element of interest. The second question is do you know if your in an iframe? If your code and element are in different frame you will need to dig into the frame by getting the iframe element and doing a iframeElement.contentDocument.document.getElementById("IdHere").
Another thing worth trying is doing a document.querySelector("cssSelectorHere"). Much like getElementByID, it will return an element to you, however you can use a css selector to find the element. This may be easier in some scenarios, however this might only work in IE9+/Chrome/Firefox/Safari and may have trouble on older browsers (namely ie8 and below).