Groovy web console

subscribe to the feed Subscribe
to this
site
Untitled (via #groovywebconsole)
tweet this snippet Tweet
this
script

Untitled

Published 1 month ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
import java.text.ParseException
import java.text.SimpleDateFormat

String pattern = 'MM/dd/yyyy'

SimpleDateFormat sdf = new SimpleDateFormat(pattern)
sdf.setLenient(false)

sdf.parse('06/18/2017asdasqw')