Domanda

My string dates are as follows in YYYYMM format:

201008
201009
201010
201011
201012
...

The following is my CONVERT statement in my stored procedure:

CONVERT (datetime, @FileName + '01', 112)

my results are showing up fine in SQL-Server as follows

2010-10-01
2010-11-01
2010-12-01
...

However, in MS Dynamics CRM they are showing up as the last day a month earlier (corresponding with the previous SQL-Server results) as follows:

9/30/2010
10/31/2010
11/30/2010
...

What the heck is going on here?

È stato utile?

Soluzione

You always have to remember that CRM stores the dates in UTC, but displays them as the users's timezone:

So for your example, when you're working in SQL the Date Time is in UTC, but when you look at CRM it's in your local time.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top