To get dates between two dates I have used the following query.
SELECT TO_DATE('01-JAN-2001','DD-MON-YYYY') + (ROWNUM - 1) new_date
FROM ALL_OBJECTS
WHERE TO_DATE('01-JAN-2001','DD-MON-YYYY') + (ROWNUM - 1) <=
TO_DATE('16-MAY-2001','DD-MON-YYYY');
The above query works fine and return all the dates, but the format is 1/1/2001, 1/2/2001... and so on till 05/16/2001. But I want to insert the records in the target table dd-mon-yyyy format in the date format and other relevant information like month number, month name, day_number, day_name based on the target table (Sen_date).
Dates don't have any inherent format -- they are converted to strings in some display format either based on the settings of your client, or your server, or through a specified date format picture.
If you want to view them in a particular format then try
Bookmarks