1

Topic: SELECT SYSDATE contains only date, why?

Hello! I will not understand Something, why my request:

select sysdate from dual;

Produces only date, without time?
Stupidly so:

wrote:

21.02.18

The main thing looked and here and on SO, at people in the core at a question - how to remove hours/minutes from date. At me sysdate does not contain hours/minutes basically, and they are necessary to me. What to do and what to it an explanation?

2

Re: SELECT SYSDATE contains only date, why?

Instead of it is necessary to confuse the data to their representation on the screen.
Prophetical dates it timestamp (0) - here in it also result, if want to see seconds.
It is possible and to_char it is important to understand that after such conversion date turns at line that cardinally changes some things.

3

Re: SELECT SYSDATE contains only date, why?

Basil A. Sidorov , clearly. And it is possible to make somehow representation in a format with hours and minutes? Without manipulations in requests, DB adjustment somewhere can?

4

Re: SELECT SYSDATE contains only date, why?

Read to dock on formats of representations (for alter session) or to simply dock on sqlplus - it much that is able. To format - including.
P.S. Coercion to timestamp than is not pleasant? ?
So get used - for any convenient language/means always it is possible to find the inconvenient task.
Formatting - generally the task of the client. And in this task there is a mass of ambiguities and .

5

Re: SELECT SYSDATE contains only date, why?

rtyts wrote:

Hello! I will not understand Something, why my request:

select sysdate from dual;

Produces only date, without time?

Because so date display in the client is adjusted.
For example, sqlplus operates so (other clients are adjusted differently):

SQL> show parameter nls_date_
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
nls_date_format string dd.mm.rr
nls_date_language string RUSSIAN
SQL> select sysdate from dual;
SYSDATE
--------
21.02.18
SQL> alter session set nls_date_format ='dd month yyyy hh24:mi ';
The session is changed.
SQL> show parameter nls_date_
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
nls_date_format string dd month yyyy hh24:mi
nls_date_language string RUSSIAN
SQL> select sysdate from dual;
SYSDATE
----------------------
February, 21st 2018 16:26
SQL> alter session set nls_date_language ='ENGLISH ';
The session is changed.
SQL> show parameter nls_date_
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
nls_date_format string dd month yyyy hh24:mi
nls_date_language string ENGLISH
SQL> select sysdate from dual;
SYSDATE
-----------------------
21 february 2018 16:27
SQL>

6

Re: SELECT SYSDATE contains only date, why?

rtyts wrote:

I will not understand Something, why my request

The child .
All councils above do not approach you. Adjust the developer

7

Re: SELECT SYSDATE contains only date, why?

123 wrote:

the child .
All councils above do not approach you. Adjust the developer

the similar. In the developer precisely also it is possible to fulfill alter session... And to receive date in the necessary format.

8

Re: SELECT SYSDATE contains only date, why?

! All thanks! And in  (sql developer) found:
[quote =] Tools> Preferences> Database> NLS