Hi Kay,
The script you enter in the NCM UI is exactly what you would enter if you logged in to the switch e.g. via putty.
In your case, it will look like
terminal shell
set snmp-server location `show time`
I'm not a IOS shell expert, so the commands above will probably have to be modified in order to work.
Regards,
Jiri