Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Null Dates
Message
 
To
17/07/2003 15:26:40
Mindy Shingara
Central Susquehanna Intermediate Unit
Lewisburg, Pennsylvania, United States
General information
Forum:
ASP.NET
Category:
WebForms
Title:
Miscellaneous
Thread ID:
00811250
Message ID:
00811300
Views:
20
Hi Mindy!

I hope all is going well for you all in Lewisburg. How was your cruise?

I know you are using FoxPro data and the problem is null dates come through as 12/10/1899. The only thing you can do is loop through the records in the dataset and replace the values with DBNull.Value like the following code:
DateTime dtFoxProNull = DateTime.Parse("12/30/1899");
foreach (DataRow dr in ds.Tables["MyTable"].Rows)
{
  if (DateTime.Parse(dr["theColumn"].ToString()) == dtFoxProNull)
     dr["theColumn"] = DBNull.Value;
]
ds.AcceptChanges;
>I can display a valid check date in the CheckDate field in my grid, however, if the check date is null, my grid is displaying a generic date of 12/30/1899. Why? Can I see a blank field if there is no check date? Once I assign a valid check date to a particular transaction, it overrides the generic date of 12/30/1899 to display the correct date. I need to see NULL dates!
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform