Get current datetime on nullable sql field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sl1ver
    New Member
    • Mar 2009
    • 196

    Get current datetime on nullable sql field

    I retrieve a null value from a nullable sql datacolumn but when I pull it into a property it automatically gets the current datetime.

    How will I go about making sure that this value returns a null and not the currentdatetime .
  • Sl1ver
    New Member
    • Mar 2009
    • 196

    #2
    I figured out the problem. I was using
    Code:
    DataFunctions.CastDateTime(record["usrLastLoginStampDate"]);
    instead of nullabledatetim e like
    Code:
    DataFunctions.CastNullableDateTime(record["usrLastLoginStampDate"]);

    Comment

    Working...