none
datatable compute question RRS feed

  • Question

  •  

    I have a DataTable which has a datetime column 'Date' and a double column 'Val'

     

    I want to calculate the monthly average of the double column.

     

    dt.compute("Avg(Val)", "Date ???")

     

    How do I write the filter string so it will only calculate one month average?

    Wednesday, June 27, 2007 1:59 PM

All replies

  • How about...

     

    Code Snippet

    Dim avg As Object = dt.Compute("Avg(Val)", "Date >= '1/1/2007' AND Date < '2/1/2007'")

     

    Wednesday, June 27, 2007 3:47 PM