/ Published in: Groovy
URL: www.wysmedia.com
another way to set / create a date using jodatime download jodatime at http://joda-time.sourceforge.net/
Expand |
Embed | Plain Text
Comments
Subscribe to comments
You need to login to post a comment.

??
Not sure what that's supposed to demonstrate, but you can easily set/create a date like:
d = new DateTime('1776-07-04')
If you want it formatted:
import org.joda.time.* import org.joda.time.format.* d = new DateTime('1776-07-04') assert 'Thu, 04/07/1776 00:00:00' == DateTimeFormat.forPattern('EEE, dd/MM/yyyy HH:mm:ss').print(d)
it didnt work yawmark.
I did this [code] import org.joda.time.* ;
def myDate = new DateTime(new Date().parse("dd/MM/yyyy","20/10/2009")); [/code]