I need to calculate the number of days between 2 dates. I think I have confused myself beyond repair and I am seeking some advice. Below is a snip of my code. In a nutshell I am reading 2 string values, converting them to date and then I want to calculate the difference. any help would be appreciated..... String ds1 = a[x].getinvoice().substring(date_start, last_paren); String ds2 = a[x].getdate().trim();
mike r Welcome to the Java Ranch, we hope you�ll enjoy visiting as a regular however, your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy. Thanks again and we hope to see you around the ranch!!
It's really important to step back and think about the data types in this problem. It's a surprisingly common one. What is the conceptual data type of the difference between two dates? If you were making a class to hold the difference between two dates, what would you call it? Hint: it's not a Date.