Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null Date Problem

Status
Not open for further replies.

raphael232

Programmer
Joined
Jun 9, 2006
Messages
51
Location
GB
Hi, i'm using the GridView1_RowDataBound event handler to color rows under certain circumstances. I have the following code:

Code:
If e.Row.RowType = DataControlRowType.DataRow Then
  Dim ReviewDate As DateTime = DataBinder.Eval(e.Row.DataItem, "ReviewDate")
  ...
End If

to get the the ReviewDate from the row but the trouble is that if the review date is null it chucks back an error. How can i check that before setting the reviewdate. Appreciate your help. Thanks
 
Try using Date.TryParse


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top