Re: Search an Outlook appointment



That's it. I can convert my datetime to a string, depending on the local
systemtime using :
GetDateFormat(NULL, DATE_SHORTDATE, &st, NULL, strDate, 250);

Then I can make my search string using the strDate.

If anyone has the same problem, I can help.

Regards,


"Frank Quinty" wrote:

Thanks for your answer.

But the application is written in C++. CStr does not exists.

And my problem is to convert datetime to a string : the string must be
03/27/2006 for an english user using datetime like mm/dd/yyyy and the string
must be 27/03/2006 for a french user using datetime like dd/mm/yyyy .

How can I get the right datetime format of the user for making the search?

Or how can I make a search with the long value of the datetime. (this
solution runs fine with POOM on a Pocket PC : [Start] >= <38803.7082)?

Regards,


"Dmitry Streblechenko" wrote:

You can use CStr function to convert datetime to a string:
dtStart = #03/27/2006#
strSearch = "[Start] >= " & CStr(dtStart)

To create restrictions in Redemption, use the MAPITable object.See
http://www.dimastr.com/redemption/mapitable.htm#resand for an example that
restricts messages on a range of dates.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"Frank Quinty" <FrankQuinty@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D04070F0-DD4B-4288-AF90-D38917714A81@xxxxxxxxxxxxxxxx
Hi,

I need to search for Outlook appointements from date to date. But I do not
know the date format of the client.

_AppointmentItemPtr pAppointment;
pAppointment=pItems->Find(CSSearch);

It runs fine if the search is : [Start] >= '03/27/2006' for an english
client using 'mm/dd/yyyy' as date format.

But it must be : [Start] >= '27/03/2006' for a french client using date
format like 'dd/mm/yyyy'.

How could I get the customer date format?

Or how could I make a search using the long value of the date?
It runs fine with POOM on Pocket PC with search like : [Start] >=
<38803.7082. But this search does not run with Outlook.

Any idea?

Regards,

PS : I also using Outlook Redemption. Is there a search solution for
Outlook
appointments inside?




.



Relevant Pages

  • Re: dateTime Manupulations
    ... Notice the quoted string, a specific format for a date & time. ... will need to convert that string into a DateTime. ... > datetime conversion between strings, however it was a datetime conversion ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Axis <-> .Net xsd:date interoperability problem
    ... .NET can de-serialize from alternative string representations of the date, ... but you need to tell it the format to expect. ... DateTime to be set. ... serialization of all DateTime's. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: convert a date to a string?
    ... converting it to a CHARACTER string. ... Also, don't convert it back to a datetime, or put it in a datetime variable, ... or you'll lose the format. ... >>> Declare @m int ...
    (microsoft.public.sqlserver.programming)
  • RE: SqlCeEngine.CreateDataBase() - LCID - Datepart format problem
    ... Background info on why insert in your format doesn't work: ... datetime as string, SQL CE does an implicit convert from string to ... datetime formats with their style IDs are listed in CONVERT function in SQL ...
    (microsoft.public.sqlserver.ce)
  • Re: Outlook Date format.
    ... Now if you want to convert datetime (TDateTime in Delphi) to a string, ... OutlookSpy - Outlook, CDO ...
    (microsoft.public.office.developer.outlook.vba)