sql - How can I get the company's fiscal year for a date? -


The company uses this year as the financial year on July 1 next year till June 30 next year, with January January Is referred to. 1. For example, May 20, 2014 is in fiscal year 2014 and July 21, 2014 in fiscal year 2015. I have to show the rental / date plus fiscal year (only 4 marks a year).

  Hire_date 01-Jun-98 16-Aug-2012 -Feb-09 09-01-March 06 01-DC-08 17-Mar-99 16-FA0-07  
  select rent_date, remove (add_months (trunc (from year), hire_date, 'mm'), 6)) as the order of t42 by fiscal_year hire_date; HIRE_DATE FISCAL_YEAR --------- ----------- 01-DC-08-2009 01-Jun-1998 1998 01-March 06 06 06 02 02 February 09 -09-16- Eg-99 2000 16-Feb-07 2007 17-Mar-1999 1999  

You can use the extract () and case What Andrew was pointing to:

  select rent / debit, withdraw (rental_data year) + Remove the case (month from rental_date) & gt; = 7th, 1 second 0 year as Android;  

.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -