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}

tagomtechAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mrcoffee365Commented:
Boy does that not look like Java.  Where did you get that sample line of code?
0
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
$V{firstDayOfWeek}.toString().substring(0,10)

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

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mrcoffee365Commented:
Okay - -if you solved it, you can ask the moderator to close the question.
0
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.