Avoid exception if the dt does not have any row after filter

Below linq throw error(Source contains no rows) if there is no rows that satisfies the condition .How can this be eliminated

DtConversationDT.AsEnumerable() .Where(Function(row) row.Field(Of DateTime)(“modifiedAtAsDate”).AddHours( CInt(in_Config(“PendingTime”).ToString)) <= DateTime.UtcNow) .CopyToDataTable()

:ambulance: :sos: [FirstAid] Handling of The source contains no DataRows exception - News / Tutorials - UiPath Community Forum

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.