Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i need to replicate this situation:
DATE | Day |
06/08/11 | 15 |
21/08/11 | 4 |
25/08/11 | 9 |
03/09/11 | 14 |
17/09/11 | 8 |
25/09/11 | 6 |
01/10/11 | 9 |
10/10/11 | 5 |
15/10/11 | 23 |
07/11/11 | 16 |
23/11/11 | 25 |
18/12/11 | 10 |
28/12/11 | 44 |
10/02/12 | 99 |
For Example 15 = 21/08/11- 06/08/11
How can i do?
Thanks a lot
Try this:
Table:
LOAD Date#(DATE, 'DD/MM/YY') as DATE;
LOAD * Inline [
DATE
06/08/11
21/08/11
25/08/11
03/09/11
17/09/11
25/09/11
01/10/11
10/10/11
15/10/11
07/11/11
23/11/11
18/12/11
28/12/11
10/02/12
];
NewTable:
LOAD Peek('DATE')- DATE as Day,
DATE
Resident Table
Order By DATE desc;
DROP Table Table;
This also works -
Input:
Load Date#(Date,'DD/MM/YY') as Date inline [
Date
06/08/11
21/08/11
25/08/11
03/09/11
17/09/11
];
Output:
Load Date,
if(Date1-Date>0,Date1-Date,0) as Days;
Load Date,
Peek('Date',recno(),'Input') as Date1
Resident Input;