Use TimGetSeconds() to get the number of seconds past 1 Jan 1904.
Use TimSecondsToDateTime to convert to a DateTime structure
Use TimeToAscii and DateToAscii to convert to strings in your favorite
format.
Concatenate.

See Chapter 29, TimeManager, in the PalmOS Reference for more details.

-bob mckenzie, palmsource pdx

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 25, 2002 11:16 AM
To: Palm Developer Forum
Subject: Assistance with timestamps in database


Hi all -

  I am developing an inventory-like program, and I am having issues storing
time stamps.  Currently, I use the conduit piece to assign a time-stamp to
the record when the handheld syncs using the "C" function: ctime.  This
returns a value like: "Thu Apr 25 14:12:00 PM 2002".
  What I need to do is move that function from my conduit code into my palm
program to assign a timestamp when I write the record to the database.  I
have looked over the API reference, and I am not seeing a way to get the
current time from the Palm and return it in a format similar to the above.
I don't need the format to be identical to the above, but I do need both
date and time stored in the same string.  Can someone help point me in the
right direction?

Thanks.

 - Marshall Parker
   Owner, MazeSoft Publications


-- 
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/

Reply via email to