The footer should update with current time and hour when a new Item added to the file. Here is the sample file format,
ITEM1
ITEM2
06/07/2010 10:20:22 //footer line
The “item” has to append in the existing file, prior to the footer line, and the footer should be updated with new value. I am having to variables, “item” and “time” which hold the respective values as string.
After adding a new item (ITEM3) the file looks like,
ITEM1
ITEM2
ITEM3
07/07/2010 17:20:12 //changed footer
Help me to acheive this.