Hi, I am trying to write a simple program which calculates how many days people have been lived in a house. I have data file named "People.txt" which has such structure: LastName FirstName CameIn CameOut DayCost
I have written a program which makes the "Summary.txt" file like this: LastName FirstName CameIn CameOut DayCost But I need to get the structure of this: LastName FirstName CameIn DaysLived NeedsToPay
But I don't know how to make a calculation of DaysLived from the CameIn and CameOut dates.
Example of People.txt: HaradaTsujoshi2006.04.122006.05.1225.0 Example of Summary.txt Harada TsujoshiWed Apr 12 00:00:00 EEST 2006Fri May 12 00:00:00 EEST 200625.0
[ September 18, 2006: Message edited by: Donatas Latauskas ]
posted 11 years ago
I have solved this, with this code:
I am going to test your electrical conductivity with this tiny ad: