Don't you need to allocated dateStringLength space somewhere for
Currentdate, and timeStringLength space somewhere for Currenttime before
using them?

Ed
----- Original Message -----
From: "Bulent Gecer" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, November 06, 2000 6:46 AM
Subject: SV: Get system date


> /************************************************************
>  *
>  *  FUNCTION: GetCurrentDate
>  *
>  *  DESCRIPTION: Gets the current date and time.
>  *
>  * PARAMETERS: none
>  *
>  *  RETURNS: nothing.
>  *
>  *************************************************************/
> static void GetCurrentDate()
>

>     DateTimeType ct;
>     Char* Currentdate;
>     Char* Currenttime;
>
>     SystemPreferencesType sysPrefs;
>     // Get system preferences
>
>     PrefGetPreferences(&sysPrefs);
>
>      TimSecondsToDateTime(TimGetSeconds(),&ct);
>
>      // Get date
>      Currentdate='\0';
>      DateToAscii(ct.month,ct.day,ct.year, dfYMDWithDashes,Currentdate);
>
>      // Get time
>      Currenttime='\0';
>      TimeToAscii( ct.hour, ct.minute, tfColon24h, Currenttime);
> }
>
> Hope it helps!
>
> /Bulent Gecer
>
> Javier Picazo Montoya <[EMAIL PROTECTED]> skrev i
diskussionsgruppsmeddelandet:[EMAIL PROTECTED]
> >
> > How Do I get the system date in a Palm?
> >
> > Thank you.
> >
> >
> >
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to