Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have fiedl date_ini that look like
11/11/2007
26/11/2007
28/11/2007
21/03/2008
26/11/2008
16/01/2009
26/11/2009
30/07/2013
now i need do te finish day for this dates
example
start date finish day
11/11/2007 25/11/2007 26/11/2007 - 1
26/11/2007 27/11/2007 28/11/2007
28/11/2007 20/03/2008 21/03/2008
21/03/2008 25/11/2008 26/11/2008
i need do that in script for late do a intervalmatch with other date field.
Thanks
Try this.
DATA:
Load Date(Date#(STARTDATE,'DD/MM/YYYY')-1) as EndDate,Previous(Date(Date#(STARTDATE,'DD/MM/YYYY'))) as StartDate inline [
STARTDATE
11/11/2007
26/11/2007
28/11/2007
21/03/2008
26/11/2008
16/01/2009
26/11/2009
30/07/2013
];
Regards,
Kaushik Solanki
original data
DATE QT
11/11/2007 7
26/11/2007 1
28/11/2007 1
21/03/2008 8
26/11/2008 30
16/01/2009 8
26/11/2009 6
11/07/2013 3
RESULT with your suggest.
STARTDATE ENDDATE QTSTOCK
26/11/2007 10/11/2007 7
28/11/2007 25/11/2007 1
21/03/2008 27/11/2007 1
26/11/2008 20/03/2008 8
16/01/2009 25/11/2008 30
26/11/2009 15/01/2009 8
11/07/2013 25/11/2009 6
10/07/2013 3
shoul be..
STARTDATE | ENDDATE QTSTOCK |
11/11/2007 25/11/2007 7
26/11/2007 27/11/2007 1
28/11/2007 20/03/2008 1
21/03/2008 | 25/11/2008 8 |
thanks
Hi,
Load Date(Date#(DATE,'DD/MM/YYYY')-1) as EDATE,Date(Date#(Previous(DATE),'DD/MM/YYYY')) as SDATE,QT inline [
DATE, QT
11/11/2007, 7
26/11/2007, 1
28/11/2007, 1
21/03/2008, 8
26/11/2008, 30
16/01/2009, 8
26/11/2009, 6
11/07/2013, 3
] where not isnull(Date(Date#(Previous(DATE),'DD/MM/YYYY')));
Regards,
Kaushik Solanki