Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the table which consists of order ID and Order closed date(YYYY.MM.DD),for example
OrderID | OrderClosedDate |
1 | 2020.05.12 |
2 | 2019.05.15 |
3 | 2016.05.17 |
4 | 2014.04.30 |
5 | 2018.05.12 |
6 | 2015.06.10 |
7 | 2018.03.08 |
1. I want to get the orders ID's which were closed before 2016.12.31 and
2. I want to get order ID's which were closed between 2017.01.01 to 2018.12.31
I tried this method
Where OrderClosedDate < 2016.12.31
but it didn't work and I was able to view all the rows,How to overcome it?
Try like this in Script.
SET DateFormat='YYYY.MM.DD';
tab1:
LOAD *, If(OrderClosedDate<'2016.12.31','<2016.12.31',If(OrderClosedDate>='2017.01.01' And OrderClosedDate<='2018.12.31','>=2017.01.01 & <=2018.12.31','N/A')) As Rules;
LOAD * INLINE [
OrderID, OrderClosedDate
1, 2020.05.12
2, 2019.05.15
3, 2016.05.17
4, 2014.04.30
5, 2018.05.12
6, 2015.06.10
7, 2018.03.08
];
Where you are writing or want this condition? In script? or in Chart?