Problems with the xs:date or xs:dateTime

Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Problems with the xs:date or xs:dateTime

Viewing 1 reply thread
  • Author
    Posts
    • #19646

      Hi,

      I’m having a very strange error in my orchestraction and I just can’t understand what is happening.

      I have a xml that’s is consumed to start a orchestraction, it’s recevies a date and a id. The xsd defines date has xs:date and the id has xs:string.

      In some point of my orchestraction I will do a transformation were i pass this date field  do other message with a date field called date1 and I use the functoid addDays with the date and a duration  has parameters  then i will store this in another date field called date2 field.

      Then I send this message to a webservice  so I use a message assignment  where I associate the fields (which were promoted) to the Webservice message  and here is where the strange erro occurs to me.

      In the webservice the  date1  will have less one day: example  if I put in the beginning of the orchestration 31-05-2008 in the webservice will be 30-05-2008…. I don’t used any substraction or something it just happens in that message assigment.

       

      Anyone has ideia what this could be?

       

      Thanks everyone!

    • #19707

      Internally Biztalk works in UTC time.

      You need to adjust your dates for local time:
      eg
      localDate = date1.Add(System.TimeZone.CurrentTimeZone.GetUtcOffset(date1));

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.