Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

POOM Restrict() -- date format changed in WM5?
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().



Report this thread to moderator Post Follow-up to this message
Old Post
Todd Saylor
09-16-05 08:57 AM


Re: POOM Restrict() -- date format changed in WM5?
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...
> 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().
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
ppcinfo
11-08-05 12:28 AM


Re: POOM Restrict() -- date format changed in WM5?
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...
> 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... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Todd Saylor
11-27-05 08:58 AM


Re: POOM Restrict() -- date format changed in WM5?
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++.

"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... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Todd Saylor
11-28-05 08:58 AM


Re: Re: POOM Restrict() -- date format changed in WM5?
Just 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++.

Report this thread to moderator Post Follow-up to this message
Old Post
jpmobile
12-28-05 08:43 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Smartphone Developer Forum archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 02:51 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.