I have a LINQ query that I need to insert null dates into.
var query = (
from MyTable in InTable.AsEnumerable()
group MyTable by MyTable.Field<String>("ClientAccountId") into g
select new
{
Activity = OutputActivity,
GroupMember = OutputGroupMember,
BranchNo = OutputBranchNo,
EarmarkingID = "",
CounterpartyAcronym = GetClientMapping(ClientMapping, g.Key),
ProductType = OutputProductType,
StartDate = DateTime.Now,
EndDate = nulldate
}
Currently nulldate is a string containing "nulldate" that I interpret later in the process.
Is there a way to actually have a null datetime value in the query result?
Don't flame if you think you are doing my job for me, just FO and don't reply.
Where's Gentile when you need her.
var query = (
from MyTable in InTable.AsEnumerable()
group MyTable by MyTable.Field<String>("ClientAccountId") into g
select new
{
Activity = OutputActivity,
GroupMember = OutputGroupMember,
BranchNo = OutputBranchNo,
EarmarkingID = "",
CounterpartyAcronym = GetClientMapping(ClientMapping, g.Key),
ProductType = OutputProductType,
StartDate = DateTime.Now,
EndDate = nulldate
}
Currently nulldate is a string containing "nulldate" that I interpret later in the process.
Is there a way to actually have a null datetime value in the query result?
Don't flame if you think you are doing my job for me, just FO and don't reply.
Where's Gentile when you need her.
Comment