How to get totalt minutes in datacolumn Total
Question About Asp Now() Function
Hi,
I want to get total minutes in my datacloumn name "Total" i9t given me the correct # when I put hours eg( 2.00pm to 10.00pm total come to 480" but the problem comes when I try to enter 4.00 to 4.30 it is not showing the correct #. Please help below append is my code. Thank in advance
Dim dt As New DataTable()
Dim ds As New DataSet()
dt = New DataTable("dt1")
Dim dt1 As New DataColumn()
dt1.ColumnName = "FromTime"
'dt1.DataType = Type.GetType("System.Double", 2)
dt1.DataType = (GetType(Decimal))
dt.Columns.Add(dt1)
DataGridView1.DataSource = dt
DataGridView1.Visible = True
Dim dt2 As New DataColumn
dt2.ColumnName = "ToTime"
' dt2.DataType = Type.GetType("System.Double", 2)
dt2.DataType = (GetType(Decimal))
dt.Columns.Add(dt2)
DataGridView1.DataSource = dt
Dim dt3 As New DataColumn()
dt3.ColumnName = "Total"
' dt3.DataType = Type.GetType("System.Double", 2)
dt3.DataType = (GetType(Decimal))
dt3.Expression = "totime*60 - fromtime *60 "
dt.Columns.Add(dt3)
DataGridView1.DataSource = dt
-question by Umesh
Reply