Issue while inserting date in to the Oracle DB table RRS feed

  • Question

  • There was an application where we was inserting the data in to the Oracle Database table. It was working fine before but suddenly I am getting the error like "Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The value for field "INVOICE_DTE" is invalid. ---> System.FormatException: The string '20170626' is not a valid AllXsd value.

    This is the information of the field in the database table

    I am currently having the scripting functoid

    public string ConvertInvoiceDate(string param1)
    return DateTime.Today.ToString("yyyyMMdd");
    Also tried using
    public string ConvertInvoiceDate(string param1)
    return DateTime.Today.ToString("dd-MMM-yyyy");
    I am not sure what is missing  here. Any help is greatly apprecited.
    Monday, June 26, 2017 6:49 PM

All replies

  • So, this is HL7 to Oracle?

    Then the value is coming in as yyyyMMdd and you should be converting to a valid xsd datetime string?

    Tuesday, June 27, 2017 5:32 AM
  • No it is not HL7.. I am trying to pass today's date in to one of the field in the Oracle Database. I am trying to pass as the string type. It was working fine earlier, but suddenly got in to this error Are you asking me to return DateTime instead of string ?
    Tuesday, June 27, 2017 5:37 AM
  • Any recent updates, service packs, deployments?
    Something must have triggered the issue

    From description it should work, only thing is a string/numeric conversion but this shouldn't be a problem afaik


    Tuesday, June 27, 2017 7:00 AM