Could someone please help me.
I need to concatenate two fields, date and time.
I tried the following:
DECLARE
v_date DATE := to_date('09-MAR-2015','DD-MON-YYYY');
v_time VARCHAR2(6) := '050520';
v_full DATE;
BEGIN
v_full := TO_DATE(TO_CHAR(v_date, 'DD-MON-YYYY') || ' ' ||TO_CHAR(TO_DATE(v_time,'HH24MISS'),'HH24:MI:SS'), 'DD-MON-YYYY HH24:MI:SS');
DBMS_OUTPUT.PUT_LINE(v_full);
END;
I received the date, 09-MAR-2015, but not the time.
I would like for the field, v_full, to be: 09-MAR-2015 05:05:20.
Is it possible to get the needed results without defining, v_full, as timestamp.
Thanks in advance,
getjbb
I need to concatenate two fields, date and time.
I tried the following:
DECLARE
v_date DATE := to_date('09-MAR-2015','DD-MON-YYYY');
v_time VARCHAR2(6) := '050520';
v_full DATE;
BEGIN
v_full := TO_DATE(TO_CHAR(v_date, 'DD-MON-YYYY') || ' ' ||TO_CHAR(TO_DATE(v_time,'HH24MISS'),'HH24:MI:SS'), 'DD-MON-YYYY HH24:MI:SS');
DBMS_OUTPUT.PUT_LINE(v_full);
END;
I received the date, 09-MAR-2015, but not the time.
I would like for the field, v_full, to be: 09-MAR-2015 05:05:20.
Is it possible to get the needed results without defining, v_full, as timestamp.
Thanks in advance,
getjbb