Im having some trouble with DateTime: Using Fetch
<attribute name='new_startdate' groupby='true' dategrouping='day' alias='new_startdate' />
<attribute name='new_enddate' groupby='true' dategrouping='day' alias='new_enddate' />
<attribute name='new_duedate' groupby='true' dategrouping='day' alias='new_duedate' />
Think this is the bit thats Wrong....
DateTime scheduledstart = ((DateTime)((AliasedValue)a["new_startdate"]).Value);
tracer.Trace("DateTime 1 Done");
DateTime enddate = ((DateTime)((AliasedValue)a["new_enddate"]).Value);
tracer.Trace("DateTime 2 Done");
DateTime scheduledend = ((DateTime)((AliasedValue)a["new_duedate"]).Value);
Then i add to the new Entity...
if (scheduledstart != null)
{
Activity.Attributes.Add("scheduledstart", scheduledstart);
}
if (enddate != null)
{
Activity.Attributes.Add("scheduledend", enddate);
}
if (scheduledend != null)
{
Activity.Attributes.Add("scheduledend", scheduledend);
}
Any Ideas How i write the DateTime using AliasedValue from fetch? or a better way to do this>
Thanks