-1

I have created a column with the following formula

IFN(t1.COVEFFDATE<'01APR2014'D, '01APR2014'D, t1.COVEFFDATE)

t1.COVEFFDATE is a date field in the table. I have put a DATE9. format to my computed column, however it's producing ********* in my query data set. How do I solve this issue?

Jayesh Menon
  • 59
  • 1
  • 5
  • 1
    I thought when I read your title that your CAPS LOCK must be broken, but I see from your question text that it isn't. Is there a particular reason you're SHOUTING at us? It won't get you an answer any more quickly here. – Ken White Feb 18 '15 at 23:04
  • Huh? Sometimes people capitalize differently. Not a big deal. – DWal Feb 19 '15 at 00:16

1 Answers1

0

Nevermind, figured it out. COVEFFDATE is a date/time field so changed the format of the computed column to DTDATE9. and the formula to the computed column to:

IFN(t1.COVEFFDATE<'01APR2014:00:00:00'DT, '01APR2014:00:00:00'DT, t1.COVEFFDATE)
Jayesh Menon
  • 59
  • 1
  • 5
  • 1
    FYI, another way to make it work is to use the `datepart` function to return just the date part of your variable. e.g. `datepart(t1.COVEFFDATE)<'01APR2014'D`. – DWal Feb 19 '15 at 00:18