I have a date in a varchar2 with format 'ddmmyyyy' and I want to convert it to the format 'yyyy-mm-ddThh:mm:ssZ' in which the final variable has a date time format.
For instance, I have the following varchar2 variable variable1
:
variable1 := '11092016'
;
and I want the final result be:
variable2:='2016-09-11T00:00:00Z'
where variable2
is not a varchar2 but has other any date time format.
Can anyone help me, please?