Forum Discussion
- AyeshahyderNew Contributor
Can you please address this issue at the earliest. I would really appreciate your help.
- ChrisAdamsChampion Level 3
Hi,
The below code segment works....
import java.util.concurrent.TimeUnit; def epoch = System.currentTimeMillis(); log.info(epoch); log.info(epoch.toString());
Your example must be incomplete though.
The part I don't get is...
result["time"] = epoch.toString();
Extending the above to include this....
import java.util.concurrent.TimeUnit; def epoch = System.currentTimeMillis(); log.info(epoch); log.info(epoch.toString()); result["time"] = epoch.toString();
Running returns the following error....
Mon May 08 11:30:43 BST 2023:ERROR:An error occurred [No such property: result for class: Script6], see error log for details
Can you share more of your example or be clearer about what you want to achieve?
- jjamContributor
long epoch = System.currentTimeMillis()/1000
Related Content
- 2 years ago
- 2 years ago