Code Comments
Programming Forum and web based access to our favorite programming groups.Hi - I've got some code that uses the POOM Restrict() call to select appointments in a particular date range, using a string such as this: [Start] > "8/30/2005" For the date value I was using GetDateFormat() to apply the short date format for the phone's locale. This was working well for WM2003 for various locales, but under WM5 it seems to only accept the US format (like MM/DD/YYYY). If I use the native short date format instead, for non-US locales I receive an "invalid parameter" hresult. For example, "DD.MM.YYYY" is not accepted even when that is the normal date format for the locale. Has anyone else seen this change in behavior? Was this an intentional change in WM5? I haven't been able to find any documentation that clarifies the allowable date formats for Find() or Restrict().
Post Follow-up to this messageTodd, Did you ever get this figured out? I'm having the exact same problem with tasks on a WM 5.0 OS device. Any advice or help would be appreciated! ppcinfo "Todd Saylor" <xx> wrote in message news:OBz6lHpuFHA.1472@TK2MSFTNGP15.phx.gbl... > Hi - > > I've got some code that uses the POOM Restrict() call to select > appointments in a particular date range, using a string such as this: > > [Start] > "8/30/2005" > > For the date value I was using GetDateFormat() to apply the short date > format for the phone's locale. This was working well for WM2003 for > various locales, but under WM5 it seems to only accept the US format (like > MM/DD/YYYY). If I use the native short date format instead, for non-US > locales I receive an "invalid parameter" hresult. For example, > "DD.MM.YYYY" is not accepted even when that is the normal date format for > the locale. > > Has anyone else seen this change in behavior? Was this an intentional > change in WM5? I haven't been able to find any documentation that > clarifies the allowable date formats for Find() or Restrict(). > >
Post Follow-up to this messageHi, just noticed your post. I've never learned anything official about this but I'm working around it by always using the MM/DD/YYYY format when running under WM5. - Todd "ppcinfo" <ppcinfo@yahoo.com> wrote in message news:OYMkW4o4FHA.1148@tk2msftngp13.phx.gbl... > Todd, > > Did you ever get this figured out? I'm having the exact same problem with > tasks on a WM 5.0 OS device. Any advice or help would be appreciated! > > ppcinfo > > "Todd Saylor" <xx> wrote in message > news:OBz6lHpuFHA.1472@TK2MSFTNGP15.phx.gbl... > >
Post Follow-up to this messageActually...I just received a tip on this today. It turns out that you can
also use a numeric DATE value, and this should work on all vesions from
WM2002 through WM5. I haven't tried this yet myself, but the syntax should
look something like this:
Find( TEXT("[Start] >= <36000.00") )
Note the leading "<" sign on the value and the trailing decimal places. The
actual number is the same type of value that is stored in the DATE datatype
in C++.
"Todd Saylor" <xx> wrote in message
news:OPFOihy8FHA.3432@TK2MSFTNGP10.phx.gbl...
> Hi, just noticed your post. I've never learned anything official about
> this but I'm working around it by always using the MM/DD/YYYY format when
> running under WM5.
>
> - Todd
>
> "ppcinfo" <ppcinfo@yahoo.com> wrote in message
> news:OYMkW4o4FHA.1148@tk2msftngp13.phx.gbl...
>
>
Post Follow-up to this messageJust to let others know as well, this is clearly broken in WM5 and it appear
s that it might be due to the other problem that is present in GetLocaleInfo
related to the ordering of date fields.
It's nice how MS's applications always work just fine, but when you use the
APIs that they encourage/limit you to use, that you're left to find the issu
es that exist.
I for one don't know why MS has not simply published the lower-level details
of Outlook Mobile to developers, and fine, give them a warning that the dat
a format may change in the future, but at least all developers would have be
tter/faster/more reliable access to the PIM data on the device.
So far developing for WM5 has turned into a series of hacks to workaround th
ings that are broken or not fully implemented.
[QUOTE]Originally posted by Todd Saylor
[B]Actually...I just received a tip on this today. It turns out that you can
also use a numeric DATE value, and this should work on all vesions from
WM2002 through WM5. I haven't tried this yet myself, but the syntax should
look something like this:
Find( TEXT("[Start] >= <36000.00") )
Note the leading "<" sign on the value and the trailing decimal places. The
actual number is the same type of value that is stored in the DATE datatype
in C++.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.