Below is what I've tried that I think is nearest to what might work. After
defining the datacolumn, I then add it to a datatable. Note that ""BirthDay"
is a column of type DateTime in the DataTable.
Dim col8 As DataColumn = New DataColumn("AgeToday",
System.Type.GetType("System.TimeSpan"),"#10-30-2006# - BirthDay")
The column get added to the datatable ok but when I fill in the "BirthDay"
column with some data, I get the error "cannot perform the operation on
System.DateTime and System.DateTime".
--
Dennis in Houston
"Cor Ligthert [MVP]" wrote:
Dennis,
I don't know if it is possible, but the first thing you have to ask to
yourself is what difference do you want.
Days, Months, Years (I do not know how to get that in the expression).
Be aware what is nowhere told that you have to use the literal #MM-dd-yyyy#
expression for Dates in the expression. For you as American not such a
problem of course because that is in USA notation (for others who reads this
afterwards).
Cor
"Dennis" <De****@discussions.microsoft.comschreef in bericht
news:26**********************************@microsof t.com...
I am trying to set up an Expression column in a DataTable for display in a
DataGrid that subtract the column ("BirthDay") from todays date. I can't
seem to get it right...is this possible?
--
Dennis in Houston