This content has been marked as final.
Show 7 replies
-
Re: Load dates in script
youssef belloum Sep 27, 2017 12:06 PM (in response to Faris Ahamad M)Hi,
here is one of the methods to do it:
SET v_STARTDATE = '01/01/2016';
SET v_ENDDATE = '01/12/2017';
TMP_DATE:
LOAD date(date#('$(v_STARTDATE)','DD/MM/YYYY')-1 + recno() ,'DD/MM/YYYY') as Date
AUTOGENERATE (date#('$(v_ENDDATE)','DD/MM/YYYY') - date#('$(v_STARTDATE)','DD/MM/YYYY')) + 1 ;
DATE_TABLE:
LOAD
*,
Month(Date)&Year(Date) as Month_year
RESIDENT TMP_DATE
where Date < AddMonths(today(),-1) and Date > AddMonths(today(),-11);
DROP TABLE TMP_DATE;
Hope it helps
YB
-
Re: Load dates in script
Faris Ahamad M Sep 27, 2017 12:43 PM (in response to youssef belloum)Hi,
Thanks for the reply . But i dont want to hardcode the end date.can we make it as today()?
-
-
-
Re: Load dates in script
youssef belloum Sep 27, 2017 2:05 PM (in response to Massimo Grossi )Yes for sure you can put whatever you want in the variables.
Tell me if you want an example
-
Re: Load dates in script
Faris Ahamad M Sep 28, 2017 6:14 AM (in response to youssef belloum)Thank you Youssef for ur support
-
Re: Load dates in script
youssef belloum Sep 28, 2017 6:16 AM (in response to Faris Ahamad M)you're welcome !
-
-
-
Re: Load dates in script
Faris Ahamad M Sep 28, 2017 6:12 AM (in response to Massimo Grossi )Thank you.This is exactly whai wanted
-