You're welcome Anwar. You can also watch the other videos about LINQ. They are also in detail for each function etc. Just let me know your feedback also and if you need anything about LINQ, what I don't have on my channel.
Very clear explanation. Thanks much for the wonderful video on LINQ. Keep rocking and upload more videos on API integrations, LINQ, AI fabric, some new features of uipath RPA.. thank you so much once again
You're welcome Pravin 😊 You can also check the other LINQ videos, where I explained the different operators in details. There are also many different examples in each video about LINQ.
wow, you guys have done a fantastic job with this, the use of TTS is a great idea, particulalrly if your not a native english speeker. I work a lot with TTS and create audio books, so I get the power of it. The only sugestion, the script still needs a little work to improve some of the flow. if you need help with this, I would be more than happy to offer my support. Anyway, I for one am a fan, the way you structure the lessons is very effective, i like the idea of the back and forth between the two charicters, but to be honest, its a little but cheesy. anyway, great work. I will be watching more of these when I get time.
Thanks Tony for the feedback :-) This video was the beginning. You can check the newest videos. Maybe they are better. I am happy to hear your feedback also, and how to make it better and easier to understand etc. You can contact me per mail.
Hi, thank you very much for this great video, I have a small question, let's say I have a datatable where one column contains amount and currency, how can I use LINQ in Uipath to remove the currency from all rows in that column? Let's say there is a row 100 EUR and I want to leave only 100 and remove "EUR". If you already posted video regarding it I would appreciate the link
Hi, Thank you for this wonderful LINQ series... In the last part of the video, instead of using build datatable, I have used below query but getting the "specified cast is not valid" error. Could you please suggest the solution (From row In OutputDT1 Join row1 In OutputDT2 On row("Name").ToString Equals row1("Name").ToString Select ResultDT.LoadDataRow(New Object(){row.Field(Of String)("Name"),row.Field(Of Int32)("Age")},False) ).CopyToDataTable
Thanks Nandani, I think you need to add this assembly in the main xaml file *System.Data.DataSetExtensions* But I would prefer to use my method in the video because it is easier to use and you don't have to write too much text. You can decide what you want to use, just suggesstion
Do you mean using Group By clause or method in a LINQ query ? There are many other videos about that on my channel. Please check them. If you mean something else, please give me more details and I will try to do that asap!
In case of Query Syntax, we don't get the suggestions. But if you are using Method syntax, you will get the suggestions. This is in general. But to get the suggestions for arrays for example, you have to use it in this way: MyArray.AsEnumerable To learn more about the Query and Method syntaxes, please check the video on my channel, where I explained both. The video is called: Write LINQ Query
Thanks Devashish :-) I don't know what you mean exactly. What do you want to do? If you want to loop through rows and columns in LINQ query, you can watch this video to learn that. Maybe it could help you. th-cam.com/video/HFam-My6T4k/w-d-xo.html Else please explain more about your question and I will try to help you further ;-)
@@ActAutomate Out_DT.Rows.Add( specifying column names).....rather than manually selecting columns can we select all columns in inner join b/2 DataTables
Nicely explained Mahmoud 👍, extend these linq series with more examples of DataTable/different enumerable datatype with different scenarios in future videos. Keep up the good work.✌️
Thank you Ded Yeah sure, I will publish new videos about LINQ for different sources, DataTables, Arrays, XML, JSON, etc. Please subscribe my channel to get the new videos ;-)
Hi, This is so wonderful .Thank you for making this video so clear! can you please help me to find maximum number in the column (Dt name is Input_DT.Column name is "age")
I will create new videos about the other functions of LINQ, like Min, Max, Sum, etc. Please wait for the next videos. For now you need to search for Min function in LINQ. You can find it in UiPath Community. If you don't find anything, I will try to help you then, but you will find it for sure ;-)
Hi Abdelrahman, Yes you need it, so that you can know the different activities and the different data types, and also the basics of UiPath. This course is more for advanced developers, who want to increase the performance of the code using LINQ queries instead of Loops etc. But it will be good for you to learn it from beginning, so that you can use it in your projects. If you have any questions or needs, just write us and we will try to help you further ;-)
And we also have other videos about LINQ in the channel. Please check the LINQ playlist to see the different functions in LINQ. We will also publish new videos about LINQ in the next time
Hi Mahmoud. Very well explained thankyou. I got an error saying unexpected token when i tried to initialise XDocument.Load(strPath) to xDoc variable of type XDocument. strPath is nothing but the path of xml input file
Please first check the following videos about XML. I think you will find the answer you need there. If you still need help, please let me know. XML For Beginners: th-cam.com/video/t6DZsXQldzI/w-d-xo.html XML in UiPath: th-cam.com/video/e7DZHR2gCKE/w-d-xo.html LINQ XML: th-cam.com/video/PfvaNGCW6Hk/w-d-xo.html Last(OrDefault): th-cam.com/video/-5MQ3viVnY0/w-d-xo.html
I mean after From not directly, but in general not before From. This means, you can use From, Order, Where, Select Or you can use: From, Where, Order, Select There is no difference in this case. But you can not use Order, From, .... This is the meaning of the point here.
In this case is the output an Array. You have to convert the Array to String. To do this, you can use the following statement after the LINQ query: String.Join(";" , Output_Numbers) In this case, you will get the following text: 2;4;6;8 But you can use another Separator, for example: String.Join("." , Output_Numbers) The output will be: 2.4.6.8
Unfortunately we don't have a solution for that. We are working on it, so that you don't need to select each column. For now we have to select each column we need. We will post a new video about that, once we find a solution!
There is another video, where I explained the 3 different ways of writing a LINQ query. Please check it on my channel. These are: 1. Query Syntax 2. Method Syntax 3. Mixed Syntax In case you are writing a LINQ query using Method syntax and you want to query a DataTable, you *MUST* use DataTable.AsEnumerable, else you can not write the query (query is wrong) But in case you are writing the query using Query or Mixed syntax, you *CAN* use the AsEnumerable method, but you don't have to. My recommendation is to use it in all 3 different ways. Why? Because once you are using the method, you have suggestions from UiPath once you want to write a method etc. I mean for example the following query: ( From row in MyTable.AsEnumerable Where row("Name").ToString.StartsWith("X") Select row ).CopyToDataTable() Here I used the variable row (as range variable) to loop the data source (MyTable). I used the method AsEnumerable, therefore once I want to use row inside the query, UiPath knows that the variable row is of type DataRow and gives me suggestions for this type, such as the properties ItemArray, Item, etc. Without using this method, UiPath doesn't know what is this variable and gives no suggestions. In this way you must know the methods and properties of DataRow, so that you can use them, because no suggestions will be shown. Here are examples about the three different LINQ Syntaxes: *Query Syntax:* From row in MyTable.AsEnumerable Where row("Name").ToString.StartsWith("X") Select row *Method Syntax:* MyTable.AsEnumerable.Where(Function(row) row("Name").ToString.StartsWith("X")).CopyToDataTable *Mixes Syntax:* ( From row in MyTable.AsEnumerable Where row("Name").ToString.StartsWith("X") Select row ).CopyToDataTable() If you still have any questions, please let me know. Happy coding :-)
Sure! You can add the following instead of: out_DT.Rows.Add .... You can add this: Select dtResult.LoadDataRow(New Object(){tb1.Field(Of String)(“City”)},False)).CopyToDataTable In this example you create a new column "City" from type string. If you have an error, you need to check the imports.
Hi Mahmoud while performing Linq quey on datable i get any error "Assign: The source contains no DataRows." . source is excel sheet and read data and get datatable . pls help
Hi Sunny, Can you please share your query? And also the data in your Excel sheet? This issue appears, if the output of your query doesn't have any rows (no output matches), therefore you get this problem. To solve the problem you need if condition. In this condition you have to set the following: If the output is nut empty, then get the output as it is, else get an empty datatable. How to do that exactly and how to use the IF condition in LINQ query? --> This is my next video in the next days. I am working on it currently.
@@ActAutomate yes Mahmoud i will share it soon and eagerly waiting for next video .. thank you so much .. your content is very helpful . i m following your channel on linkdn and on youtube .. if possible can i get ur email id pls ..
Hi Andy, Do you mean the xaml files from this video? Unfortunately I don't have them anymore. If you need something specific, just let me know and I will try to send you something about it. You can also check the other videos, where I also have many other queries and functions.
📝 𝗟𝗜𝗡𝗤 𝗩𝗶𝗱𝗲𝗼𝘀
𝗔. 𝗣𝗔𝗥𝗧𝗜𝗧𝗜𝗢𝗡 𝗢𝗣𝗘𝗥𝗔𝗧𝗢𝗥𝗦
➊ 𝗧𝗔𝗞𝗘: th-cam.com/video/PnaylK37gLE/w-d-xo.html
➋ 𝗦𝗞𝗜𝗣: th-cam.com/video/RDQ9CrtumKU/w-d-xo.html
➌ 𝗧𝗔𝗞𝗘𝗪𝗛𝗜𝗟𝗘: th-cam.com/video/nM6oYFLMjfU/w-d-xo.html
➍ 𝗦𝗞𝗜𝗣𝗪𝗛𝗜𝗟𝗘: th-cam.com/video/sMSMmIGOsuQ/w-d-xo.html
𝗕. 𝗣𝗥𝗢𝗝𝗘𝗖𝗧𝗜𝗢𝗡 𝗢𝗣𝗘𝗥𝗔𝗧𝗢𝗥𝗦
➊ 𝗦𝗘𝗟𝗘𝗖𝗧: th-cam.com/video/DIx0SsRML9o/w-d-xo.html
➋ 𝗦𝗘𝗟𝗘𝗖𝗧𝗠𝗔𝗡𝗬: th-cam.com/video/fo9GD6rTJTA/w-d-xo.html
𝗖. 𝗙𝗜𝗟𝗧𝗘𝗥𝗜𝗡𝗚 𝗢𝗣𝗘𝗥𝗔𝗧𝗢𝗥𝗦
➊ 𝗪𝗛𝗘𝗥𝗘: th-cam.com/video/97bM7c_Z3c4/w-d-xo.html
𝗗. 𝗤𝗨𝗔𝗡𝗧𝗜𝗙𝗜𝗘𝗥 𝗢𝗣𝗘𝗥𝗔𝗧𝗢𝗥𝗦
➊ 𝗔𝗟𝗟: th-cam.com/video/v_HbqcaeitI/w-d-xo.html
➋ 𝗔𝗡𝗬: th-cam.com/video/ushKsJAXRT8/w-d-xo.html
𝗘. 𝗘𝗟𝗘𝗠𝗘𝗡𝗧 𝗢𝗣𝗘𝗥𝗔𝗧𝗢𝗥𝗦
➊ 𝗘𝗹𝗲𝗺𝗲𝗻𝘁𝗔𝘁: th-cam.com/video/IxpF7l1vCXg/w-d-xo.html
➋ 𝗘𝗹𝗲𝗺𝗲𝗻𝘁𝗔𝘁𝗢𝗿𝗗𝗲𝗳𝗮𝘂𝗹𝘁: th-cam.com/video/IxpF7l1vCXg/w-d-xo.html
➌ 𝗙𝗶𝗿𝘀𝘁: th-cam.com/video/Ja-9dFEl6js/w-d-xo.html
➍ 𝗙𝗶𝗿𝘀𝘁𝗢𝗿𝗗𝗲𝗳𝗮𝘂𝗹𝘁: th-cam.com/video/Ja-9dFEl6js/w-d-xo.html
➎ 𝗟𝗮𝘀𝘁: th-cam.com/video/-5MQ3viVnY0/w-d-xo.html
➏ 𝗟𝗮𝘀𝘁𝗢𝗿𝗗𝗲𝗳𝗮𝘂𝗹𝘁: th-cam.com/video/-5MQ3viVnY0/w-d-xo.html
٤١
?!!@@awatafaelbadry7270
Very clear! Teaching an advanced concept with simple understandable examples. Great job. Thanks a lot.
Thank you Peyman :-)
This video cleared many of my doubts thnx
Happy to hear that :-)
Grate Video I am very clear about LINQ now
Very good, happy to hear that, Tishar.
You can also check the other LINQ Tutorials Videos, where we explained the different operators in detail.
@@ActAutomate Yes very well explained
@@tushar8004 Thanks 🥳
Awesome way of teaching
Thank you :-)
Thank you so much for explaining in detail
You're welcome Anwar.
You can also watch the other videos about LINQ. They are also in detail for each function etc.
Just let me know your feedback also and if you need anything about LINQ, what I don't have on my channel.
These tutorials are so well made, keep going!
Thank you very much. Please wait for the next videos about LINQ in UiPath ;-)
Very clear explanation. Thanks much for the wonderful video on LINQ. Keep rocking and upload more videos on API integrations, LINQ, AI fabric, some new features of uipath RPA.. thank you so much once again
Thanks R Hiran.
Yes I will do ;-)
Just wait for the next videos -.-
Very helpful video, congratulations for your smothly job!!
Thanks alot Eduardo 🤗
This is the great video for beginners, I got to know about LINQ in uipath,
I have a request, Please make a video on SQL in UiPath
Thanks for the feedback.
What do you want to learn about SQL in UiPath?
Please write me some examples or points, what you want to learn!
@@ActAutomate I want to learn use of all the activities relates SQL querry and all the commands that are generally used in SQL in Uipath
@@dheerajgupta5727 ok I will try to do that asap ☺
nice videos sir
Thanks Durga 😀
did I find the best course or what, thank you is not een enough 🙏🙏🙏🙏🙏🙏🙏🙏
Thanks Fatima, very happy to have you here :-)
Very helpful video Sir😊
Thanks aparna :-)
Hello Mahmoud...
Thank you for this wonderful video... It helped me a lot. Thanks😊
You're welcome Pravin 😊
You can also check the other LINQ videos, where I explained the different operators in details. There are also many different examples in each video about LINQ.
wow, you guys have done a fantastic job with this, the use of TTS is a great idea, particulalrly if your not a native english speeker. I work a lot with TTS and create audio books, so I get the power of it. The only sugestion, the script still needs a little work to improve some of the flow. if you need help with this, I would be more than happy to offer my support.
Anyway, I for one am a fan, the way you structure the lessons is very effective, i like the idea of the back and forth between the two charicters, but to be honest, its a little but cheesy. anyway, great work. I will be watching more of these when I get time.
Thanks Tony for the feedback :-)
This video was the beginning. You can check the newest videos. Maybe they are better.
I am happy to hear your feedback also, and how to make it better and easier to understand etc.
You can contact me per mail.
Hi, thank you very much for this great video, I have a small question, let's say I have a datatable where one column contains amount and currency, how can I use LINQ in Uipath to remove the currency from all rows in that column? Let's say there is a row 100 EUR and I want to leave only 100 and remove "EUR". If you already posted video regarding it I would appreciate the link
very nice explanation🥰....keep doing
Thanks Gattu 🥰
Wow great video!! Thank you
You're welcome Fwzia ;-)
Great video Mahmoud, Subscibed.
Thanks @Med id lahcen
Hi,
Thank you for this wonderful LINQ series...
In the last part of the video, instead of using build datatable, I have used below query but getting the "specified cast is not valid" error. Could you please suggest the solution
(From row In OutputDT1
Join row1 In OutputDT2
On row("Name").ToString Equals row1("Name").ToString
Select ResultDT.LoadDataRow(New Object(){row.Field(Of String)("Name"),row.Field(Of Int32)("Age")},False)
).CopyToDataTable
Thanks Nandani,
I think you need to add this assembly in the main xaml file
*System.Data.DataSetExtensions*
But I would prefer to use my method in the video because it is easier to use and you don't have to write too much text. You can decide what you want to use, just suggesstion
Great tutorial!!
Thanks Dinesh :-)
wow this tutorial is amazing. I´m thrilled into watching the rest of the series. Thank you very much, keep it up!
Thanks for the feedback Thomas, very happy to hear that :-)
thanks for explanation :)
You're welcome :-)
Can you pls explain the how to concatinate and group the multiple row data in the uipath as soon as possible
Do you mean using Group By clause or method in a LINQ query ?
There are many other videos about that on my channel. Please check them.
If you mean something else, please give me more details and I will try to do that asap!
Can we use Group by and concatenate at a time for same table
Sure. Please check the other LINQ videos to learn more about that. If you still have questions, please let me know@@nithyaa.n7474
Hi I need one help, my uipath studio is not working means I am not able to edit anything but it will show detected attended robot asthe license type
i have a question, here you are using one data table and getting unique value @30:00 and what about the same task by utilizing 2 data tables?
Mahmoud, Why suggestions were not coming up when using .ToArray, .CopyToDataTable?
In case of Query Syntax, we don't get the suggestions.
But if you are using Method syntax, you will get the suggestions.
This is in general.
But to get the suggestions for arrays for example, you have to use it in this way:
MyArray.AsEnumerable
To learn more about the Query and Method syntaxes, please check the video on my channel, where I explained both. The video is called: Write LINQ Query
Great video! Is there
any way to select all columns then writing them one by one in out.Rows. Add ( ..... )
Thanks Devashish :-)
I don't know what you mean exactly. What do you want to do?
If you want to loop through rows and columns in LINQ query, you can watch this video to learn that. Maybe it could help you.
th-cam.com/video/HFam-My6T4k/w-d-xo.html
Else please explain more about your question and I will try to help you further ;-)
@@ActAutomate Out_DT.Rows.Add( specifying column names).....rather than manually selecting columns can we select all columns in inner join b/2 DataTables
@@devashishnigam5971 Ah ok now I understand your question.
It's not easy to implement. I will create a new video how to do this. Just wait please!
Nicely explained Mahmoud 👍, extend these linq series with more examples of DataTable/different enumerable datatype with different scenarios in future videos. Keep up the good work.✌️
Thank you Ded
Yeah sure, I will publish new videos about LINQ for different sources, DataTables, Arrays, XML, JSON, etc.
Please subscribe my channel to get the new videos ;-)
@@ActAutomatesure, great background music choice in whole video. 😀
@@dedsec5177 Thanks 😃
Hi,
This is so wonderful .Thank you for making this video so clear! can you please help me to find maximum number in the column (Dt name is Input_DT.Column name is "age")
I will create new videos about the other functions of LINQ, like Min, Max, Sum, etc.
Please wait for the next videos.
For now you need to search for Min function in LINQ.
You can find it in UiPath Community.
If you don't find anything, I will try to help you then, but you will find it for sure ;-)
@@ActAutomate Thanks ! waiting for your next video ! your explanations are so clear ..
@@tharaninatarajan2248 Thanks Tharani
What is the prerequisites for this course? Should i finish uipath foundation course before starting this one ?
Hi Abdelrahman,
Yes you need it, so that you can know the different activities and the different data types, and also the basics of UiPath.
This course is more for advanced developers, who want to increase the performance of the code using LINQ queries instead of Loops etc.
But it will be good for you to learn it from beginning, so that you can use it in your projects.
If you have any questions or needs, just write us and we will try to help you further ;-)
And we also have other videos about LINQ in the channel.
Please check the LINQ playlist to see the different functions in LINQ.
We will also publish new videos about LINQ in the next time
@@ActAutomate thank you :)
@@abdelrahmanbadr2404 You're welcome Abdelrahman :)
Hi Mahmoud. Very well explained thankyou. I got an error saying unexpected token when i tried to initialise XDocument.Load(strPath) to xDoc variable of type XDocument. strPath is nothing but the path of xml input file
Please first check the following videos about XML. I think you will find the answer you need there. If you still need help, please let me know.
XML For Beginners: th-cam.com/video/t6DZsXQldzI/w-d-xo.html
XML in UiPath: th-cam.com/video/e7DZHR2gCKE/w-d-xo.html
LINQ XML: th-cam.com/video/PfvaNGCW6Hk/w-d-xo.html
Last(OrDefault): th-cam.com/video/-5MQ3viVnY0/w-d-xo.html
36:38 Mahmoud, Why should we put ORDER before SELECT. You said it should be after FROM.
I mean after From not directly, but in general not before From.
This means, you can use From, Order, Where, Select
Or you can use:
From, Where, Order, Select
There is no difference in this case.
But you can not use Order, From, ....
This is the meaning of the point here.
Hi, How can I get all the output numbers 2,4,6,8 in one single message box? in case of the LINQ array modulo example
In this case is the output an Array.
You have to convert the Array to String.
To do this, you can use the following statement after the LINQ query:
String.Join(";" , Output_Numbers)
In this case, you will get the following text:
2;4;6;8
But you can use another Separator, for example:
String.Join("." , Output_Numbers)
The output will be:
2.4.6.8
@@ActAutomate Thank you so much for this! Also, can I get to enter space instead of the "," or "." ? Thanks!
So that my output is:
2
4
6
8
Yes of course. You only have to set the following:
String.Join(" " , Output_Numbers)
how to select all columns (of both tables) after joining two tables is there any code like in SQL we can say (Select * from )
Unfortunately we don't have a solution for that. We are working on it, so that you don't need to select each column. For now we have to select each column we need.
We will post a new video about that, once we find a solution!
@@ActAutomate ok thank you
in which case we use datatable.asenumerable()??
There is another video, where I explained the 3 different ways of writing a LINQ query. Please check it on my channel.
These are:
1. Query Syntax
2. Method Syntax
3. Mixed Syntax
In case you are writing a LINQ query using Method syntax and you want to query a DataTable, you *MUST* use DataTable.AsEnumerable, else you can not write the query (query is wrong)
But in case you are writing the query using Query or Mixed syntax, you *CAN* use the AsEnumerable method, but you don't have to.
My recommendation is to use it in all 3 different ways. Why? Because once you are using the method, you have suggestions from UiPath once you want to write a method etc. I mean for example the following query:
(
From row in MyTable.AsEnumerable
Where row("Name").ToString.StartsWith("X")
Select row
).CopyToDataTable()
Here I used the variable row (as range variable) to loop the data source (MyTable). I used the method AsEnumerable, therefore once I want to use row inside the query, UiPath knows that the variable row is of type DataRow and gives me suggestions for this type, such as the properties ItemArray, Item, etc.
Without using this method, UiPath doesn't know what is this variable and gives no suggestions. In this way you must know the methods and properties of DataRow, so that you can use them, because no suggestions will be shown.
Here are examples about the three different LINQ Syntaxes:
*Query Syntax:*
From row in MyTable.AsEnumerable
Where row("Name").ToString.StartsWith("X")
Select row
*Method Syntax:*
MyTable.AsEnumerable.Where(Function(row) row("Name").ToString.StartsWith("X")).CopyToDataTable
*Mixes Syntax:*
(
From row in MyTable.AsEnumerable
Where row("Name").ToString.StartsWith("X")
Select row
).CopyToDataTable()
If you still have any questions, please let me know. Happy coding :-)
@@ActAutomate thanks for clarifying. Much appreciated
@@hantrantruongngoc3528 Any time 🙂
Thanks for wonderful video shall you please provide us query using inbuilt function like sum()
Oh sorry got it in next video 😜
Very good.
But the other functions are on the checklist, like sum function.
Just wait for the next videos ;-)
Sure please upload some more video on orchestrator multi bot architecture regex
@@aditya10989 Can you please give me more details?
What do you mean with 'orchestrator multi bot architecture regex'?
@@ActAutomate sure like regular expressions , re framework queues ,uipath test suite,test manager advance topic in uipath
cant we do without building data table in last part of video?
Sure!
You can add the following instead of: out_DT.Rows.Add ....
You can add this:
Select dtResult.LoadDataRow(New Object(){tb1.Field(Of String)(“City”)},False)).CopyToDataTable
In this example you create a new column "City" from type string.
If you have an error, you need to check the imports.
Hi Mahmoud while performing Linq quey on datable i get any error "Assign: The source contains no DataRows." . source is excel sheet and read data and get datatable . pls help
Hi Sunny,
Can you please share your query? And also the data in your Excel sheet?
This issue appears, if the output of your query doesn't have any rows (no output matches), therefore you get this problem.
To solve the problem you need if condition. In this condition you have to set the following:
If the output is nut empty, then get the output as it is, else get an empty datatable.
How to do that exactly and how to use the IF condition in LINQ query? --> This is my next video in the next days. I am working on it currently.
@@ActAutomate yes Mahmoud i will share it soon and eagerly waiting for next video .. thank you so much .. your content is very helpful . i m following your channel on linkdn and on youtube .. if possible can i get ur email id pls ..
@@sunnysingh-ng5bz Just write me in LinkedIn and I will try to help you, if I can ;-)
@@ActAutomate sure thank you mahmoud :)
@@sunnysingh-ng5bz ☺
Hi!! Can i request xaml file for practice?
Hi Andy,
Do you mean the xaml files from this video?
Unfortunately I don't have them anymore. If you need something specific, just let me know and I will try to send you something about it.
You can also check the other videos, where I also have many other queries and functions.
What's wrong in this Statement
Which statement exactly?
You didn't add it here!
قؤ
:-D
dt.AsEnumerable().ToList().ForEach(Sub(row) row.SetField("ngày", Convert.ToDouble(row.Field(Of Integer)("time")) * 24))
dt.Columns("ngày").SetOrdinal(dt.Columns.Count - 1)
dt.AsEnumerable().ToList().ForEach(Sub(row) row.SetField("Tên cột", If(String.IsNullOrEmpty(row.Field(Of String)("Tên cột")), "", Convert.ToDouble(row.Field(Of String)("Tên cột")).ToString("N2"))))
dt.AsEnumerable().ToList().ForEach(Sub(row) row.SetField("ngày", Convert.ToDouble(row.Field(Of Integer)("time")) * 24))
Do you need help or what exactly? You only wrote the code lines without any comments. I don't know what do you need. Please let me know.