Home > database > Turn the SQL statement date is equal to the number doesn't work
Turn the SQL statement date is equal to the number doesn't work
Time:09-19
The select RETURNTIME, RETURNSTATION from B_LEASEINFOHIS Where RETURNTIME & gt;=to_date (' 2014-05-01 ', '- DD YYYY - MM) and RETURNTIME & lt;=to_date (' 2014-05-03 ', '- DD YYYY - MM) RETURNTIME are date fields, I put the string in the to - date to date compared with RETURNTIME, but why do I choose to only data of May 2nd day
CodePudding user response:
You this two days of data should be 5.1 and 5.2;
Did you check these, 5.1 data;
CodePudding user response:
PS: give you moved to the development zone, there is basically no one went to;
CodePudding user response:
The equal sign can certainly use Must be data problem
CodePudding user response:
To_date (' 2014-05-01 ', '- DD YYYY - MM) date format your actual format is 2014-05-01 00:00:00 Statement is no problem, you can find the 2014-05-01 data, should be a repository was not conform to the requirements of the data