how to convert this java statement to groovy

I need to convert this java statement to groovy

new Long(($F{Call Started}.getTime()/1000)-$F{Call Started}.getSeconds())

The idea is that i actually only need to pull the MM/dd/yyyy from $F{Call Started}

Who is Participating?
tagomtechAuthor Commented:
I wrote it and yes this line is java:
new Long(($F{Call Started}.getTime()/1000)-$F{Call Started}.getSeconds())

this same line blows up in groovy
What I did to fix my problem was
first piece of code- this is groovy and returns a Date which is the Sunday of the before the $F{Call Started}.getTime())

($P{cal}.setTimeInMillis($F{Call Started}.getTime()) || $P{cal}.add(java.util.Calendar.DAY_OF_YEAR, -1*($P{cal}.get(java.util.Calendar.DAY_OF_WEEK)-1))) ? null : new java.sql.Timestamp($P{cal}.getTimeInMillis())

Then I used this piece code to format it down to just MM/dd/yyyy

FYI - I am working with a program called iReport and JasperServer.

Boy does that not look like Java.  Where did you get that sample line of code?
Okay - -if you solved it, you can ask the moderator to close the question.
Kevin CrossChief Technology OfficerCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.