Help with Function

J

jjacob

Here is the function as copied from sql view

IIf(([dbo_Pr_EmpJobData_T]![dteEndRateDate]=9/9/9999),"
",[dbo_Pr_EmpJobData_T]![dteEndRateDate])

What I am trying to do is if the date shows 9/9/9999 in the EndRateDate
field then show nothing but if it is anything other than 9/9/9999 show me the
date in that same field.

When I run this all the dates show nothing. help?
 
J

John Spencer

You forgot the date delimiter of "#". And I would return Null rather that
a string, so if you want to sort by dteEndRateDate you will get a date order
sort instead of a string order sort.

IIf([dbo_Pr_EmpJobData_T].[dteEndRateDate]=#9/9/9999#,
Null,[dbo_Pr_EmpJobData_T].[dteEndRateDate])
 
Top