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
Post a Comment