Flight Date Format
Hi!
This insert statement inserts the flight number, flight date, and capacity into the flights table. However, the flight date is a timestamp data type in Java. I need the date to show only day, month, and year without the time.
INSERT INTO flights
SELECT 'LH6035', TO_DATE('20070101', 'YYYYMMDD') + day -1, 150
FROM days
WHERE ROWNUM <= 365;
-----------------------------------------------------------------------------------------------------------------------
SELECT * FROM flights WHERE ROWNUM <= 2;
FLIGHT_NUM FLIGHT_DATE CAPACITY
--------------------- ---------------------- --------------------
LH6035 01-01-07 150
LH6035 02-01-07 150
The output here is correct, but maybe the translation into Java is wrong?
Thanks for any help!