Sql server queries and reports errors based on date type

the data sent from the front desk is of date type, and then query how to report such an error in the field of date type of sql server database based on this data:

clipboard.png

,date
clipboard.png

:

clipboard.png

:

clipboard.png

:

clipboard.png


first of all, you need to see whether you are wrong by java or by sqlserver


you can directly use the fields in string format. The fields in sqlserver are of date type but are displayed with 'yyyy-MM-dd', so write a string type according to the display format and look it up directly. I reported an error here because I used the date type to receive it. I thought the data after the front-end date selection function was date type, but it was actually a string. So it's no problem to change it to a string and check it in the database


foreground js is passed in the form of string , and then converted to date type

in the background.
Menu