Home > database >  Date query oracle
Date query oracle

Time:10-25

Take of orcale how in these two fields I want to date,
The table name is rec_main_consume

CodePudding user response:

" I want to date
"

Figure in the two fields only 2015/01/19 a date

CodePudding user response:

reference 1st floor ZJHZ_ leaf response:
" I want to date
"

Figure in the two fields only 2015/01/19 a date

I didn't finish loading, from 2015-2019

CodePudding user response:

The focus is on the I want to date what do you want

CodePudding user response:

reference ZJHZ_ leaf reply: 3/f
key is I want to date what do you want

Want to 2018/12/31 2018/1/1

CodePudding user response:

Uploaddate>=2018/01/01 and uploaddate<2018/12/31?

CodePudding user response:

The
reference 4th floor you a banana and shout! Response:
Quote: refer to the third floor ZJHZ_ leaf response:
key is I want to date what do you want

Want to 2018/1/1 2018/12/31


If you want to is 2018 year data, then is to use what kind of standard to choose this time?

CodePudding user response:

refer to 6th floor minsic78 response:
Quote: refer to 4th floor you a banana and shout! Response:

Quote: refer to the third floor ZJHZ_ leaf response:
key is I want to date what do you want

Want to 2018/1/1 2018/12/31


If you want to is 2018 year data, then is to use what kind of standard to choose this time?

I mean just can be found out, I really don't understand the

How trouble bosses say the query format

CodePudding user response:

reference 5 floor ZJHZ_ leaf reply:
uploaddate>=2018/01/01 and uploaddate<2018/12/31?

An error, saying invalid characters

CodePudding user response:

The
reference 7th floor you a banana and shout! Response:
Quote: refer to the sixth floor minsic78 response:
Quote: refer to 4th floor you a banana and shout! Response:

Quote: refer to the third floor ZJHZ_ leaf response:
key is I want to date what do you want

Want to 2018/1/1 2018/12/31


If you want to is 2018 year data, then is to use what kind of standard to choose this time?

I mean just can be found out, I really don't understand the

What trouble bosses said how to query the format


Not format problem, is your demand has not been clear

CodePudding user response:

O date


Uploaddate>=to_date (' 2018-01-01 ', '- dd yyyy - mm) and uploaddate CodePudding user response:

Select *
The from rec_main_consume
Where uploaddate between to_date (' 2018-01-01 ', '- dd yyyy - mm) and to_date (' 2018-12-31', '- dd yyyy - mm)

CodePudding user response:

11 references ZJHZ_ leaf response:
select *
The from rec_main_consume
Where uploaddate between to_date (' 2018-01-01 ', '- dd yyyy - mm) and to_date (' 2018-12-31', '- dd yyyy - mm)

Ok?? Thank you bosses...

CodePudding user response:

The answer is this, unexpectedly

CodePudding user response:

The following code returns all the date in 2018, for reference only.
SELECT
TO_DATE (' 2018/01/01 ', 'YYYY/MM/DD) + level 1
The FROM
Dual
CONNECT BY
Level & lt;=TO_DATE (' 2018/12/31 ', 'YYYY/MM/DD) - TO_DATE (' 2018/01/01', 'YYYY/MM/DD) + 1;

CodePudding user response:

Select * from rec_main_consume
Where to_char (uploaddate, 'yyyy')='2018'.

CodePudding user response:

Uploaddate between to_date (' 2018/01/01 ', 'yyyy/mm/dd) and to_date (' 2018/12/31', 'yyyy/mm/dd)
  • Related