Fix EndDate error.
Add update query to change NULL dates to 0.
Add a couple of simple NBN export diagnostic tools.
Add various fixes and tweaks to NBN export routines.