T
thomas
Hello,
According to the docs it should be possible to use TimeSpan type in
DataColumn.Expression property.
http://msdn2.microsoft.com/en-us/library/system.data.datacolumn.expression.aspx
- see the Convert function description.
I just can not figure out how to specify TimeSpan value. Her is what I have
been trying:
myDateTable.Columns.Add("DateCreated", typeof(DateTime), "_DateCreatedUTC +
Convert('-05:00:00', 'System.TimeSpan')");
- it fails with the FormatException: "The string '-05:00:00' is not a valid
TimeSpan value."
Yes, I know this can be accomplished in different ways, but I am wondering
how to do it this way.
Any ideas? Thank you,
Tomasz
According to the docs it should be possible to use TimeSpan type in
DataColumn.Expression property.
http://msdn2.microsoft.com/en-us/library/system.data.datacolumn.expression.aspx
- see the Convert function description.
I just can not figure out how to specify TimeSpan value. Her is what I have
been trying:
myDateTable.Columns.Add("DateCreated", typeof(DateTime), "_DateCreatedUTC +
Convert('-05:00:00', 'System.TimeSpan')");
- it fails with the FormatException: "The string '-05:00:00' is not a valid
TimeSpan value."
Yes, I know this can be accomplished in different ways, but I am wondering
how to do it this way.
Any ideas? Thank you,
Tomasz