Thanks!
You can also use:
...
DateToAscii(ct.month,ct.day,ct.year,
(DateFormatType)PrefGetPreference(prefLongDateFormat),Currentdate);
...
TimeToAscii( ct.hour, ct.minute,
(TimeFormatType)PrefGetPreference(prefTimeFormat), Currenttime);
...
To get the time formatted in the system defined preferences for how they
like the date and time displayed.
I get the impression that this code:
SystemPreferencesType sysPrefs;
// Get system preferences
PrefGetPreferences(&sysPrefs);
may have been a start at doing what I described above, but seems unused in
this code...
Ed
----- Original Message -----
From: "Bulent Gecer" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, November 06, 2000 8:02 AM
Subject: SV: Get system date
> Of course, my mistake!
>
> The declaration should be:
>
> Char Currentdate[dateStringLength];
> Char Currenttime[timeStringLength];
>
> Sorry!
>
> /Bulent
>
>
> M. Edward Wilborne III <[EMAIL PROTECTED]> skrev i
> diskussionsgruppsmeddelandet:[EMAIL PROTECTED]
> >
> > 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/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/