Please suggest query for this
To find the max date from row of three columns and compare it with another column
Then update the particular column
The exact requirement is in the excel
With input and output
testfile - Copy.xlsx (15.3 KB)
Please suggest query for this
To find the max date from row of three columns and compare it with another column
Then update the particular column
The exact requirement is in the excel
With input and output
testfile - Copy.xlsx (15.3 KB)
@Brian_Mathew_Maben could you please help this as well at the earliest
@Anil_G could you please suggest
Yes, they should be ignored, if those columns are empty
Please check this…also the output you provided looks wrong as all the dates are greater
dt.AsEnumerable.ToList.ForEach(Sub(r) r(18) = If(Not String.IsNullOrEmpty(r(9).ToString) AndAlso CDate(r(5).ToString)>CDate(r(9).ToString),"Quality is best",If(Not String.IsNullOrEmpty(r(9).ToString) AndAlso CDate(r(5).ToString)>CDate(r(11).ToString),"Quality is best",If(Not String.IsNullOrEmpty(r(9).ToString) AndAlso CDate(r(5).ToString)>CDate(r(13).ToString),"Quality is best",If(Not String.IsNullOrEmpty(r(9).ToString) AndAlso CDate(r(5).ToString)>CDate(r(15).ToString),"Quality is best",If(Not String.IsNullOrEmpty(r(9).ToString) AndAlso CDate(r(5).ToString)>CDate(r(17).ToString),"Quality is best","Quality is Worst"))))))
This is to be used in invoke code with dt as in/out and also read data from A3
cheers
Hey @Demo_User Any updates?
If r(1).Equals(Asley) then i need to check this condition and update the column
Could please append this condition with the condition u have sent
If r(1).Equals(Asley) then i need to check this condition and update the column
Could please append this condition with the condition u have sent
Any update please let me know
Please use this
dt.AsEnumerable.Where(function(x) x(1).Equals("Ashley")).ToList.ForEach(Sub(r) r(18) = If(Not String.IsNullOrEmpty(r(9).ToString) AndAlso CDate(r(5).ToString)>CDate(r(9).ToString),"Quality is best",If(Not String.IsNullOrEmpty(r(9).ToString) AndAlso CDate(r(5).ToString)>CDate(r(11).ToString),"Quality is best",If(Not String.IsNullOrEmpty(r(9).ToString) AndAlso CDate(r(5).ToString)>CDate(r(13).ToString),"Quality is best",If(Not String.IsNullOrEmpty(r(9).ToString) AndAlso CDate(r(5).ToString)>CDate(r(15).ToString),"Quality is best",If(Not String.IsNullOrEmpty(r(9).ToString) AndAlso CDate(r(5).ToString)>CDate(r(17).ToString),"Quality is best","Quality is Worst"))))))
cheers
But it will return only the datatable with the column have ashely right?
I want the whole datatable but ashley value should have this as output incorporated
Could you please suggest,
Okay will check on the same
It works thanks for your inputs
Thanks for your input it works
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.