Actually the question is described in the title.

I have a DataTable , at the stage of creating a table I want to add a field to it in which the difference in days between today and the date specified in the row of the table in the Date field will be calculated automatically.

Is such an option possible at all? Or do the computed fields allow only simpler operations with fields?

 dtTrips.Columns.Add("date", typeof(DateTime)); dtTrips.Columns.Add("able_to_earn_in", typeof(int)); dtTrips.Columns["able_to_earn_in"].Expression = String.Format("{0}-date", DateTime.Now); 

tried something like this

0