Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
I am having date and I need New date fields's data should be like below. How can I achieve this at script level as a new field using peek or previous functions.
Date | New Date |
---|---|
01-09-2018 | 02-09-2018 |
02-09-2018 | 03-09-2018 |
03-09-2018 | 04-09-2018 |
04-09-2019 | 05-09-2018 |
05-09-2018 | 06-09-2018 |
06-09-2018 | 07-09-2018 |
07-09-2018 | - |
Regards
krishna
Hi
Try this
T:
load Date#(Date,'DD-MM-YYYY') as Date;
load * inline
[Date
01-09-2018,
02-09-2018,
03-09-2018,
04-09-2018,
05-09-2018,
06-09-2018,
07-09-2018];
F:
load Date, Previous(Date) as New_Date
Resident T
order by Date desc;
Hi Shivesh,
Thanks for your inputs, but not getting exact result.
Hi Kalyan,
Try this:
A:
load Date#(Date,'DD-MM-YYYY') as Date ;
load * inline
[Date
01-09-2018,
02-09-2018,
03-09-2018,
04-09-2018,
05-09-2018,
06-09-2018,
07-09-2018];
NoConcatenate
b:
Load
Date,
previous(Date) as NewDate
resident A
order by Date desc;
drop table A;
Br,
KC
Sorry, i missed drop table part.
Please refer below code.
T:
load Date#(Date,'DD-MM-YYYY') as Date;
load * inline
[Date
01-09-2018,
02-09-2018,
03-09-2018,
04-09-2018,
05-09-2018,
06-09-2018,
07-09-2018];
F:
load Date, Previous(Date) as New_Date
Resident T
order by Date desc;