Header Ads

Header ADS

Date list between two dates on Oracle SQL

Get the list of dates between two dates by Oracle SQL

Topic Introduction: In this tutorial, we will discuss how to find out or retrieve a list of data between 2 dates using SQL Query. I have given a sample query and its output results below. in this query I have used 2 Parameters, SDATE (Start Date) and EDATE (End Date), and the value is given 01-OCT-22, and 05-OCT-22

SELECT TRUNC (TO_DATE(:SDATE,'DD-MON-RR') + ROWNUM)-1 DATE_LIST
FROM DUAL CONNECT BY ROWNUM < (TO_DATE(:EDATE,'DD-MON-RR')-TO_DATE(:SDATE,'DD-MON-RR'))+2
;


Get the list of dates between two dates by Oracle SQL,list all dates between two dates ,get all dates between two dates ,get a list of dates between two dates - sql ,get data between two dates ,date range between two dates sql ,sql where date between two dates






No comments

Theme images by Deejpilot. Powered by Blogger.