At 12:00am -0700 00-09-30, Palm Developer Forum digest wrote:
>Wheeler,
>
>Chop the string up into month, day and year strings, convert to integers,
>then assign the results to your DateTimeType.
Two issues with this approach...
1. You want to support the date format selected by the user, so if
it's MDY vs. DMY you need to handle it correctly.
2. Given how users often are pretty sloppy in how they enter dates,
your parser really wants to handle a variety of formats (e.g.
different dividers), not just the date format selected in the Formats
panel, and also do things like automatically fill in the current year
if they leave that out, etc.
-- Ken
>----- Original Message -----
>From: "wheeler wood" <[EMAIL PROTECTED]>
>Newsgroups: palm-dev-forum
>To: "Palm Developer Forum" <[EMAIL PROTECTED]>
>Sent: Thursday, September 28, 2000 10:57 PM
>Subject: Simple (?) question about dates and strings
>
> > Have I missed something? I need to convert a CharPtr (eg. "09/28/00") to
>a
> > DateTimeType. Is there a function that does this? I see the reverse is
> > available to create a string based on a date. Thanks.
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/