Announcement

Collapse
No announcement yet.

DateTime filter error

Collapse
X
 
  • Filter
  • Time
Clear All
new posts

    DateTime filter error

    An app that worked perfectly well for a long time is now throwing an exception no matter what date is specified.

    This criteria:

    qry.AddCriteria("FLDTKTOPENDATETIME", OperatorEnum.opGreaterThanOrEqual, filterDate)

    Throws:

    Status 2000: General Error Occurred FAILURE
    Result message: ??? ?? ????? ??? ???? DateTineValue found does not match field type. The value:4/20/2022
    50000: The Data is not Correct to it Type

    For any date tested. Again, this code has been working fine for a long time.

    -- Craig

    Re: DateTime filter error

    Thanks for posting. The fact that it has been working fine for you and stopped makes it look like an external, OS maybe, change that somehow affect things, though it's not clear what this might be.

    In any case I'd add that this field expects a date-time value, unlike a data only value.

    In case the above does not help, please zip the content of your \Logs folder and email it back to us, maybe something additional is logged there.

    Hope this helps.

    Comment


      Re: DateTime filter error

      The filterDate variable is a date-time type. Nothing has changed that I know of. Will send the logs.

      Comment


        Re: DateTime filter error

        Solution if anyone ends up reading this thread: the default .net date format uses slashes dd/mm/yyyy. Something changed in the API recently and now dashes are required, dd-mm-yyyy.

        Comment

        Working...
        X