Exporting to Excel, refining data exported.

mike55

Well-known member
Joined
Mar 26, 2004
Messages
726
Location
Ireland
Hi,

I have done a select * on a particular table and I have retrieved all the necessary data. One of the fields that I am retrieving has the datetime 01/01/1753 00:00:00 assigned to it in the database if the user never supplied a value.

When I am either selecting or after I do the select is it possible for me to set the field value to blank/null so that the user sees nothing. If any other datetime then show the value.

Mike55.
 
Instead of doing select *, I would select the exact columns that you need.

Then you can use SQL to return the blanks directly from the database. The syntax will be a little different depending on what database youre using but in SQL Server, it would be the CASE WHEN construct, and in Access it would be an IIf(...) statement.

Then youre ASP code doesnt have to worry about the value at all. Its already taken care of.
 
Back
Top