How to null and invalid values in date fields

Home Page Forums BizTalk 2004 – BizTalk 2010 How to null and invalid values in date fields

Viewing 1 reply thread
  • Author
    • #12562

      I am a newbie in Biztalk. I am trying to transform a flat file into an XML file.
      1.The source text file has a [b]Birthdate[/b] field, in the flat file’s schema I have set the data type property to ‘xs:date’ and customdate/time format property to ‘MMddyyyy’.

      2.I have created the Receive pipeline and have used FlatFile disassembler.

      3. I have created a destination schema for my XML file, it also has a BirthDate field whose data type property is set to xs:date. I am using a map to transform my source flat to XML destination.

      My Concern:
      I have deployed the project and its working fine only when all the records have valid (not null) date values in the birthdate field. But it fails if any of the record is having a null value in the date field.

      I checked and received the following description in HAT:
      There was a failure executing the receive pipeline: \”ImpFile.RecMembers\” Source: \”Flat file disassembler\” Receive Location: \”C:\\BizTalkPractice\\In\\*.txt\”
      Reason: The Date or Time value received for Field: BirthDate is incorrect. Error: String was not recognized as a valid DateTime.

      Now that I have run only 3 records in my sample text file but after the project is deployed live then I will be processing 10 MB file. Is there any better option that could be followed to check the date fields against null and invalid date values. At the same time the transformation process should not eat up much time and resource…… thanks in advance ( 🙂 Amit)

    • #12561

      Hi Amit,

      Date datatype does not accept null values you must either replace null values with some default date or else change the element type as String to accept Null Values.

      For checking validity of data use Filters or Inbound Maps

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