Got a tip that the creation date was in seconds not days. That
solved the first part of my problem.
However, now that I know it means seconds since 1/1/04, I have a
slightly different problem. The creation date seems to be the date
the database is installed and not necessarily the date in which it
was created.
Which is it? Created or installed?
I have displayed the dates for several databases that I installed
on the palm. And the dates all seem to be today (the date that I
installed them) rather than the creation date.
Have I done something wrong in displaying the creation date?
Is there any way to determine when the database was actually
created for the first time?
Problem:
I want the creation date to be a part of the database; not a seperate
location like in preferences or something that can be deleted
seperate from the database. I also don't want to use a record to
store that data. I thought the logical place would be in the header
of the database (creation date). But that does not seem to be
working out.
Maybe I could use the applicationInfo block for the database. Is the
applicationInfo block part of the database or something that is
seperate from a database? I don't find much on creating an
applicationInfo block. I do see the functions for setting and
retrieving appInfo block but not on creating it. The fact that
these functions use LocalID* makes me think it is seperate from
the DB.
Any suggestions on how to do this?
// still using a modified version of what I showed before
// temp is char temp[40] declared globally
if(event->data.ctlEnter.controlID == btnTab3) {
DateTimeType date;
ULong seconds;
locID = DmFindDatabase(0, "MyTestDB");
DmDatabaseInfo(0, locID, 0,0,0,&seconds,0,0,0,0,0,0,0);
TimSecondsToDateTime(seconds, &date);
DateToAscii((Byte) date.month,(Byte) date.day, (Word) date.year,
DateFormatType)PrefGetPreference(prefDateFormat), temp);
FrmCustomAlert(altNotice, "Database Info:","Creation Date",temp);
break;
}
Thanks
--
-----------------------------------------------------------------
Discussion Group: http://www.halcyon.com/ipscone/wwwboard/
Protect your constitutional rights. Your favorite one may be next!
-----------------------------------------------------------------