I am trying to get the system datetime stamp returned into a macro language variable. I have tried many variations of code, but none has worked so far. Something like the following should work, but I am not an expert in Javascript and it is probably missing some key part.

I have made a little progress. I have finally gotten something returned in the macro variable. Unfortunately is the the word 'undefined'. I guess that is progress compared to all the empty strings I have had before.