SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Development Tools
 Reporting Services Development
 conditional expression using date
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

svibuk
Yak Posting Veteran

62 Posts

Posted - 09/29/2012 :  11:58:40  Show Profile  Reply with Quote
IIf(cdate(Fields!dtfrm.Value)="01-01-1900","",cdate(Fields!dtfrm.Value)+ " to "+cdate(Fields!dtto.Value) )

i used the above formula but i am not getting any value
if the date is 01-01-1900 ( in db its 1900-01-01) then it shld be blank else pint the date

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 10/01/2012 :  12:01:31  Show Profile  Reply with Quote
what are the datatypes of dtFrm and dtto in the db table?

In any case for concatenation you should make them all varchar

ie like

IIf(cdate(Fields!dtfrm.Value)="01-01-1900","",Cstr(Fields!dtfrm.Value)+ " to "+CStr(Fields!dtto.Value) )


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/


Edited by - visakh16 on 10/01/2012 12:02:36
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000