error occurs when using between condition over date type.
error occurs when using between condition over date type.
Clark S
Posts: 27Questions: 8Answers: 0
"knex": "^1.0.3",
"mssql": "^8.0.2",
conditions like before, after, equal are all working fine, except between.
condition works over formated_date field
node js error
Answers
btw, serverside set to TRUE.
and funny as it sounds,
when selecting the second date first then the first date, most probably the backend works, however, it fails most of the time when picking the first date then the second date,
Are you the server-side scripts that we provide? Or have you got your own?
Colin
hi Colin,
there u go.
Thanks - this might be related to this thread. We'll take a look and report back, probably tomorrow,
Colin
awesome, thanks.
Hi @Clark S ,
I don't think this is going to have been resolved by the same issue Colin mentioned above. I've tried replicating the issue locally but am unable to do so. Please post a link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Thanks,
Sandy
Hi Sandy,
I will spin up a test server today or tmw for this case, thnx for getting back to me.
hi Sandy,
http://104.129.128.180:8082/petrovend_transactions.html
the server was directly generated by the official website.
and if you select condition BETWEEN and set first date, immediately, in the console, I noticed errors showing:
dependencies:
node js server side:
front end js:
hi, any updates on this topic? thanks.
Sandy will be back in again on Thursday and will probably take a look then,
Colin
Hi @Clark S ,
I still can't replicate this locally I'm afraid.
We've just noticed that you are storing the date as a VARCHAR which is probably where your error is coming from. You should store dates as a DATE for SearchBuilder to work with them properly. Try changing that and see if it works for you.
Thanks,
Sandy
hi @sandy ,
thnx for coming back to me.. yip we noticed the same thing and the err does go away when changing the data type from varchar to datetime however, we just need to do some cosmetic work to make our current sys adaptive to such change..
regards,
Clark