I have a field that collects visit date & time but it is stored in varchar2 format 'hh24mi ddMonYYYY' and I thought this function will solve the problem but it doesn't.
create or replace function getfulldt(x in varchar2)
return varchar2 is
y Date;
begin
if x is
y := to_date(x, 'hh24mi dd-Mon-YYYY') ;
return
;
exception
when others then
return null;
end;
/
This function only truncates to date and do not display hours and minutes.
How can I fix so that it will display in date format with hours and minutes?
Thanks for your help in advance.
Di
create or replace function getfulldt(x in varchar2)
return varchar2 is
y Date;
begin
if x is
y := to_date(x, 'hh24mi dd-Mon-YYYY') ;
return
exception
when others then
return null;
end;
/
This function only truncates to date and do not display hours and minutes.
How can I fix so that it will display in date format with hours and minutes?
Thanks for your help in advance.
Di