View Single Post
  #7  
Old January 23rd 10, 10:06 AM posted to microsoft.public.outlook.program_addins
Mark B[_2_]
external usenet poster
 
Posts: 93
Default Create search folder filter that converts UTC time to local?

I saw in the MAPI viewer that it was indeed converting our UTC as though is
was local and storing it as such in UTC. So a conversion was happening.

So somehow in the SQL syntax I need to convert our MileStone1 time to local
time so Outlook's Today() function will work.

I wonder if anything in that Outlook SQL syntax would allow for this:

Today(DATEADD(minute,DATEDIFF(minute,GETUTCDATE(), GETDATE()),MileStone1))






"Ken Slovak - [MVP - Outlook]" wrote in message
...
If your text field is already in UTC time and is being imported using the
Outlook object model or Outlook UI then Outlook is taking that as local
time and converting it again, applying the conversion factor a second
time. That will produce incorrect information. You can verify if that is
happening using a MAPI viewer to view the time of that property. The MAPI
viewer will show you exactly how the time is being stored, in UTC.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mark B" wrote in message
...
I'm not sure I understand your sentence "In this case it would be easier
to use a conversion of the time you want to test to UTC for the
comparison."

The user-defined field we have "OurMileStone1DateTime" is imported from a
text file as is. So say it is "4:00 PM, Jan 22, 2010", that is 4:00 PM
Jan 22, 2010 UTC.

Are you saying that if we Outlook's today(" function as seen below, and
UTC on the user's computer is Jan 22, then Outlook will be calculate to
be True even though the user's time in the bottom right on their computer
screen may say Jan 23 (e.g. if they are in New Zealand (GMT+13))?




















Ads