Full Version: Nz function loses date formatting
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
Tim_Pope
One of the output fields in my query is Target_Date and to avoid blanks appearing in the report I have used the Nz function as follows:

Target Date: Nz([Target_Date],"No target date agreed")

The results of this query are exported to Excel but it seems that the Nz function is converting the date to a text format so filters and sorts do not work properly.

Is there a way I can amend my query so that excel will recognise the output as a date?

Tim
dannyseager
By adding in the "no target date agreed" you convert it to a string

A field can not be both a date and a string
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.