I would like to keep the value of the exitDateTime variable as null, but I can't seem to find the syntax:
else
exitDateTime = DBNull.Value;
Does not work.
>Hey, Chris,
>
>You need to check for null values first.
>
>
>DateTime exitDateTime;
>
>if(Convert.IsDBNull(Dr[drvPortfolio["EnterPriceDateTime"])==false)
> exitDateTime = (DateTime)drvPortfolio["EnterPriceDateTime"];
>else
> // whatever you want to do if IsDbNull returns a true
>
>
>There are variations on that syntax, that's the one I've often used
>
>HTH,
>Kevin
Chris McCandless
Red Sky Software