I'm trying to get time once data is submitted off-chain, since only way to get on-chain is via now to get the block time.
Off-chain I'm using "document.getElementById("demo").innerHTML = Date()" to get live time once button is click.
My question here is, is there a way to type cast this html code to a string so that I could re-send it back to the block chain and save the time there?
I've tried var string1 = String(document.getElementById("demo").innerHTML = Date()); .. But that of course doesnt work.
Really appreciate your help.