I have an alert created where I need to display current system time. There is an If condition in alert which looks something like below.
eval checkstatus=if(isnull(status), "Program has not started at @Current System Time@", "OK")
@Current System Time@ is where i want to have my system time displayed.
Is there a way this can be achieved?
now()
should be what you're looking for I think?
eval checkstatus=if(isnull(status), "Program has not started at " . now(), "OK")
This gives you the epoch value which might not be what you want, for something more humanly readable you could do
eval checkstatus=if(isnull(status), "Program has not started at " . strftime(now(),"%+"), "OK")
You can do this:
eval checkstatus=if(isnull(status), "Program has not started at ".strftime(now(), "%F %T"), "OK")