Search code examples
c#smartsheet-apismartsheet-c#-sdk-v2

Smartsheet API Set text in date column


Using the C# api, is there any way to set text into a DATE column using the api ?

I could not find any example or workaround to set string into a DATE column, and getting this error :

Date, did not conform to the strict requirements for type DATE.'

the column wasn't set to enforce date value.


Solution

  • Take a look at the Strict property on the Cell object, and set it to false. For example, your code might look like this

    var cellToUpdate = new Cell
    {
        ColumnId = 12345,
        Value = "text value",
        Strict = false
    
    };