View Single Post
Join Date: Aug 2005
Posts: 15,682
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1505
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: please help!! have some problems with my address book

 
0
  #2
Sep 8th, 2008
>>i need to include the last update date and time of the record in the form of dd-mm-yyyy,hh:mm:ss(it has to be updated by th program automatically) and i don't really know how.

Just add another field called UpdateDateTime (or whatever you want to call it) to each record which would be time_t. When you write a record get the system's time using time() function from time.h and save it to the field along with all the other information. If you don't want to save the date/time as an integer then you can call localtime() that returns a string and save that, but it will take up alot more space in the file.
I told Santa what I wanted for Christmas and he washed my mouth out with soap.
Reply With Quote