Reverse the bytes (i.e. convert the endeniness) and subtract the # seconds between 1/1/1900 and 1/1/1970. Now just assign the new value to your favorite PC time structure. BTW: it works best if you temporarily disable time zones on the PC using tzset. (work assuming UTC on both the PC and Palm) This method doesn't work if the Palm's time is set for a different time zone. You can also search the Conduit forum's archive for previously posted examples.
----- Original Message ----- From: "Peter Soong" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Tuesday, October 22, 2002 5:14 AM Subject: Convert PDB Date Field data in VB5 > Hi, > > I'm writing a conduit in VB5 for my PDB file. > > May I know how to convert the Date field data (4 > bytes) into PC understandable format? > > I know the PDB date format is number of seconds since > 1904 Jan 01 00:00 (correct me if I'm wrong) but how to > format it in PC? What is the formula? > > eg. > > The ASCII code for the PDB date is as below. > > 184,141,227, 24 > > The actual date and time (dd/mm/yy) from the above > data is 11/02/02 21:07 > > Can anyone GURU help me on this? > > > Thanks a lot. > > Regards, > Peter Soong > > > > __________________________________________________ > Do you Yahoo!? > Y! Web Hosting - Let the expert host your web site > http://webhosting.yahoo.com/ > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
