inyeartodate ('2013/01/25', '2013/02/01',
0)
|
Returns True |
inyeartodate ('2012/01/25', '2013/01/01',
0)
|
Returns False |
inyeartodate ('2012/01/25', '2013/02/01',
-1)
|
Returns True |
inyeartodate ('2012/11/25', '2013/01/31',
0, 4)
|
Returns True The value of timestamp falls inside the fiscal year beginning in the fourth month and before the value of base_date. |
inyeartodate ( '2013/3/31', '2013/01/31',
0, 4 )
|
Returns False Compared with the previous example, the value of timestamp is still inside the fiscal year, but it is after the value of base_date, so it falls outside the part of the year. |
Add the example script to your document and run it. Then add, at least, the fields listed in the results column to a sheet in your document to see the result.
This example checks if an invoice date falls in a fiscal year specified by setting the value of first_month_of_year to 4, and in the part of the year before the end of 31/01/2013.
TempTable:
LOAD RecNo() as InvID, * Inline [
InvDate
28/03/2012
10/12/2012
5/2/2013
31/3/2013
19/5/2013
15/9/2013
11/12/2013
2/3/2014
14/5/2014
13/6/2014
7/7/2014
4/8/2014
];
InvoiceData:
LOAD *,
InYearToDate(InvDate, '31/01/2013', 0, 4) AS FinYr2Date
Resident TempTable;
Drop table TempTable;
|
The resulting table contains the original dates and a column with the return value of the inyeartodate() function. |
InvDate |
FinYr2Date |
28/03/2012 |
0 (False) |
10/12/2012 |
-1 (True) |
5/2/2013 |
0 (False) |
31/3/2013 |
0 (False) |
19/5/2013 |
0 (False) |
15/9/2013 |
0 (False) |
11/12/2013 |
0 (False) |
2/3/2014 |
0 (False) |
14/5/2014 |
0 (False) |
13/6/2014 |
0 (False) |
7/7/2014 |
0 (False) |
4/8/2014 |
0 (False) |
|
|