Hi
I have below data . Image attached. In 5 column i have value 8 in last row . I want to get date value before this value gets changed.

In my case it is 2 row i.e 16/06/2023 then value comes 7.
Thanks
Hi
I have below data . Image attached. In 5 column i have value 8 in last row . I want to get date value before this value gets changed.

In my case it is 2 row i.e 16/06/2023 then value comes 7.
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mohamed Azarudeen ZPosted Jun 18, 2023, 6:41 AM
Hi ramco
you can iterate through the rows of your data structure and check the value in the fifth column. Once you encounter the value "8", you can retrieve the date value from the previous row.
Here's a sample code snippet demonstrating this logic:
Prasad RaveendranPosted Jun 18, 2023, 3:44 PM
I'm wondering, if I change the column order in the query, what would be the result of the below code?
Tuhin PaulPosted Jun 18, 2023, 3:41 PM
The code does not have robust error handling. For example, if the conversion of column values to integers or date/time fails, it may result in exceptions.
Tuhin PaulPosted Jun 18, 2023, 3:40 PM
Hi Azarudeen
The code assumes that the fifth column is at index 4 and the date value is in the first column. If the structure of the data changes or is different in different scenarios, the code may not work correctly.
Tuhin PaulPosted Jun 18, 2023, 2:52 PM