case for date

I have select statement that includes the following:
DATEADD (mm,+1,(tblUser.BILLMON +'01') ) AS TransDate,
There are some instances where tblUser.BILLMON ='000000' (usually it is 201205...or something like that)
I want a case added to the beginning of this to handle the '000000' could I go about it?
Who is Participating?
PortletPaulConnect With a Mentor Commented:
I expect tblUser.BILLMON is a (n)varchar field, and it may also be 'not null' with a default of '000000'

in other words there is probably no way of knowing what '000000' represents - so do you want NULL?

      when tblUser.BILLMON ='000000' then NULL
      else DATEADD (mm,+1,(tblUser.BILLMON +'01') )
end AS TransDate
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.