Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Enterprise
Expertise: Intermediate
Jul 26, 2002

Get the Current DataTime in Your Palm Application


It is a common feature in an application to require the current date time to be displayed in a text field or something similar.

This can be done easily in PalmOS in two steps:
 
The code is given below:-
UInt32 iTime = TimGetSeconds ();
DateTimePtr dateTimeP;
TimSecondsToDateTime (iTime ,dateTimeP);

TimGetSeconds returns the current date and time of the device in seconds since 12:00 A.M. on January 1, 1904. TimSecondsToDateTime converts the date specified as the number of seconds since January 1,1904 to a DateTimeType structure.
Shiv Gupta
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap