Date Cell Type error

Posted by: ebw on 8 September 2017, 1:34 pm EST

  • Posted 8 September 2017, 1:34 pm EST

    I am trying to create a date cell type with a user defined format (MM/YYYY).


    When I try to type in a value I get an error. {"startIndex cannot be larger than length of string.\r\nParameter name: startIndex"}


    I attached a small app for you to try.


    datecell = New FarPoint.Win.Spread.CellType.DateTimeCellType


    datecell.DateSeparator = "/"


    datecell.MaximumDate = New System.DateTime(2100, 1, 1)


    datecell.MinimumDate = New System.DateTime(1990, 12, 31)


    datecell.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.UserDefined


    datecell.UserDefinedFormat = "MM/YYYY"


    Thanks. ebw


    2008/10/NegativeTest-2.zip
  • Replied 8 September 2017, 1:34 pm EST

    Your UserDefinedFormat is incorrect...

    datecell.UserDefinedFormat = "MM/YYYY"

     should be

    datecell.UserDefinedFormat = "MM/yyyy"
     

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels