Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

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

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

Very Important crosS Applying yaK Herder

52326 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

Edited by - visakh16 on 10/01/2012 12:02:36
Go to Top of Page
  Previous Topic Topic Next 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.03 seconds. Powered By: Snitz Forums 2000