If you are after VB 'DateAdd' type of function, you don't have it here. After all PalmOS kernel has to be as small as possible, while MS never cares about the size of their products.
Make DateAdd and release it as shareware :=) Michael -----Original Message----- From: Dave Mottorn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 27 November 2001 4:34 AM To: Palm Developer Forum Subject: RE: Simple Stupid Question re: system date I just started programming Palm Applications myself but I have used C before. I know what you're saying about the documentation. It's like getting a drink out of a fire hose. I printed out the Palm OS SDK. In the chapter called Time Manager you can find what you want. I just did something like you want to do. SecondsStarted = TimGetSeconds(); TimSecondsToDateTime(SecondsStarted, &StartTimePtr); The first line give you the number of seconds since sometime in 1904 and the second line converts it into a structure of intergers representing the year, month, etc - StartTimePtr.hour gives you an integer representing the month. It's defined on page 529 of the above tome. Set up the structures like so: static ULong SecondsStarted, SecondsAtStop, SecondsToStop; static DateTimeType StartTimePtr; static DateTimeType CurrentTimePtr; static DateTimeType StopTimePtr; regards, Dave Mottorn -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dave Lippincott Sent: Monday, November 26, 2001 11:00 AM To: Palm Developer Forum Subject: Re: Simple Stupid Question re: system date In general, Palm OS is not a good platform to learn C/C++ on. If it is at all possible, you may want to use a non-C development system such as Satellite Forms or NS Basic until you're up to speed on C. ----- Original Message ----- From: "Jim Hoeger" <[EMAIL PROTECTED]> Newsgroups: palm-dev-forum To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Monday, November 26, 2001 10:13 AM Subject: Simple Stupid Question re: system date > Hi, > I've never programmed anything in "C" before (a visual basic kind of guy, > but I want to use CodeWarrior), but I am forced to write a program for my > main customer in less than 30 days. I've downloaded and read literally > thousands of pages of documents, bought 2 books and still don't have a clue > as to what I'm doing. I promise I won't post dumb questions if I can find > the answer elsewhere, but please give me a bone. > I want to start out with an editable textbox on my form where I place > today's date (mm/dd/yy), and allow the user to change it to another date > (contract start date). I then want to add 30 days to that date and display > the first payment date (in another field). > I can't find anything on getting and using the system date. It's out there > somewhere, but I admit that I'm so new that I might not know the right > question. I've downloaded day.h and selday.h, looked at the knowledge base > etc, but can't find the answer (or don't recognize it). > > Help me if you feel sorry for someone starting out (like you all did at one > time). Point me in the direction if you want, give me a sample if you > would, but my deadline is looming near and the Palm OS is very unfriendly. > > Thanks in advance, > > JimH > > > > -- > 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/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
