sql - Replace existing DATE format with another format in SSRS expression -


i have table has test column contains many values:

test

2014-04-02 2014-04-03 2014-04-04 weekly total prior week 12 week 

how can write expression using iif statement if row contains date change date different format?

for example:

the first row has 2014-04-02 (yyyy-mm-dd) should changed 02-apr (dd-mmm) last row has 12 week should not touched because it's not date

solution 1:

=iif(isdate(fields!test.value)      ,format(             cdate(iif(isdate(fields!test.value), fields!test.value, nothing))            , "dd-mmm"            )     ,fields!test.value) 

solution 2:
handle in sql using case when


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -