sql - get four digit year from oracle date -


i have table a, has column fromdate.

select to_date(fromdate,'dd-mon-yyyy') 

returns value 31-aug-99

but need know whether date 31-aug-1999 or 31-aug-2099

is there 1 help?

use to_char function date in character format.

try this:

select to_char(fromdate,'dd-mon-yyyy') a; 

or if want want in date have change nls date settings.

alter session set nls_date_format = 'dd-mon-yyyy' 

before executing original posted query.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -