I am using db2 version 7 and I need help calculating a date.
I am selecting certain records with date fields from one table and then inserting them into another table after I calculate the fiscal year date field.
The date from the first table is in this format: 01/22/1999, 01/20/2002, 06/08/1998, etc.
Now, for the first example, if the date falls between this fiscal year: April 1, 1998 - March 31, 1999, I will insert this record into a table with a budget year of 1998 (beginning of the fiscal year).
My question is this:
Does db2 provide any date functions which will help me to calculate this fiscal year date?
Or, do I have to use BETWEEN followed by my date range?
What is the best type of logic I could use to find this fiscal year date?
Reply when you can.
Thanks
John
I am selecting certain records with date fields from one table and then inserting them into another table after I calculate the fiscal year date field.
The date from the first table is in this format: 01/22/1999, 01/20/2002, 06/08/1998, etc.
Now, for the first example, if the date falls between this fiscal year: April 1, 1998 - March 31, 1999, I will insert this record into a table with a budget year of 1998 (beginning of the fiscal year).
My question is this:
Does db2 provide any date functions which will help me to calculate this fiscal year date?
Or, do I have to use BETWEEN followed by my date range?
What is the best type of logic I could use to find this fiscal year date?
Reply when you can.
Thanks
John