Hallo Liebe Genosse,
Hat jemand die Ahnung, wie man von SYSDATE auf z.B. '12-AUS-10' Datentypen konventieren?
Meine CODE:
SET SERVEROUTPUT ON
DECLARE
--> var. 'today' deklarieren und initialisieren
today DATE:=SYSDATE;
--> 2: deklariert tomorrow mit Attr.%TYPE
tomorrow today%TYPE;
--> 3. ini. 'tomorrow' im ausführbarem Bereich
BEGIN
tomorrow:=today +1;
DBMS_OUTPUT.PUT_LINE('Hallo World!');
DBMS_OUTPUT.PUT_LINE('TODAY IS:' || today);
DBMS_OUTPUT.PUT_LINE('TOMORROW IS: ' || tomorrow);
END;
/
Output von diese Code läutet:
- Hallo World
- TODAY IS 12.08.10
- TOMMOROW IS 13.08.10
Mein Ziel ist:
- Hallo World
- TODAY IS 12-AUS-10
- TOMMOROW IS 13-AUS-10
Ich danke voraus
Hat jemand die Ahnung, wie man von SYSDATE auf z.B. '12-AUS-10' Datentypen konventieren?
Meine CODE:
SET SERVEROUTPUT ON
DECLARE
--> var. 'today' deklarieren und initialisieren
today DATE:=SYSDATE;
--> 2: deklariert tomorrow mit Attr.%TYPE
tomorrow today%TYPE;
--> 3. ini. 'tomorrow' im ausführbarem Bereich
BEGIN
tomorrow:=today +1;
DBMS_OUTPUT.PUT_LINE('Hallo World!');
DBMS_OUTPUT.PUT_LINE('TODAY IS:' || today);
DBMS_OUTPUT.PUT_LINE('TOMORROW IS: ' || tomorrow);
END;
/
Output von diese Code läutet:
- Hallo World
- TODAY IS 12.08.10
- TOMMOROW IS 13.08.10
Mein Ziel ist:
- Hallo World
- TODAY IS 12-AUS-10
- TOMMOROW IS 13-AUS-10
Ich danke voraus
Comment