I am trying to convert the following code which is in c# to java. And I am facing difficulty in converting it. Please can anyone suggest me a simple way to do it in Java.
DateTime StartDate = new DateTime(PWUpdatedOn.Year, 01, 01);
TimeSpan ts = new TimeSpan(PWUpdatedOn.Ticks - StartDate.Ticks);
//Response.Write(ts.Days+1);
days = ts.Days + 1;
lngN = 0;
PWUpdatedOn.Year = 2016 // current year