Forum Discussion
Lucian
7 years agoCommunity Hero
Hey,
This is a piece of code which should work:
import java.text.SimpleDateFormat // Get timestamp def timestamp = 1526199928404 // Set a date using the timestamp def date = new Date( timestamp ) // Create a date format as desired SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd hh:mm" ) // Display your date in the defined format log.info dateFormat.format( date )
Cheers!