title: Oracle SQL date getting first day of last quarter and last day of last quarter
body: <p>I've been asked to provide an Oracle PL/SQL solution if a file is loaded into the system
  for example between the dates of 1st Jan 2017 - 31st March 2017 I should
  created two dates from the last quarter a loaded <strong>from date</strong> of 
  1st Oct 2016 and loaded <strong>to date</strong> of 31st Dec 2016. This should be future prove meaning it should work for future years, so if a file is loaded into the system lets say 21st August 2019, it should have a <strong>from date</strong> of 1st April 2019 and a <strong>to date</strong> of 30th June 2019. </p>
  
  <p><a href="https://i.stack.imgur.com/shB6j.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/shB6j.jpg" alt="enter image description here"></a></p>
  
  <p>This should be a PL/SQL solution most probably a procedure returning two dates to the main program and the <strong>to and from date</strong> returned should be in the format of DD/MM/YYYY.</p>
  
  <p>Thanks in advance.</p>