Forum Discussion
geoffcamp
15 years agoContributor
In a groovy script you can use the following to get today's datetime:
date = new Date()
You can then modify this into the format you desire with something along the lines of:
dateFormat = new java.text.SimpleDateFormat('yyyyMMdd-kkmmss')
shortDate = dateFormat.format(date)
You can then use this as required - passing it into a parameter or whatever else you need.
Hope that helps.
Geoff
date = new Date()
You can then modify this into the format you desire with something along the lines of:
dateFormat = new java.text.SimpleDateFormat('yyyyMMdd-kkmmss')
shortDate = dateFormat.format(date)
You can then use this as required - passing it into a parameter or whatever else you need.
Hope that helps.
Geoff
Related Content
Recent Discussions
- 4 days agoemoya