I have created a query like this.
<span>String</span> <span>date</span> <span>=</span> <span>"01/01/2021"</span>;
<span>String</span> <span>date2</span> <span>=</span> <span>"01/05/2021"</span>
<span>Query</span> <span>query</span> <span>=</span> em.createNativeQuery(<span>"select * .... From .... Date between ? And ?"</span>);
I want to set parameters as the two dates in this format "dd/MM/YYYY".
When I tried to set the string dates like this it is giving me an error. Can anyone help me how to do that ?