locked
Data Type on report is different than Data Source RRS feed

  • Question

  • Hi Everyone

    i have createad a simple daily status report  using SQL Server 2008R2 DB & SSRS. My data source is simple table which has  one column & its datatype is date. But when i pull this column on report in preview it shows date & time. 

    i just want to show the date not time. So can you please help me with this.

    thank you in advance



    Tuesday, March 4, 2014 10:12 AM

Answers

  • Hello Rhythm,

    can you try this.

    =FormatDateTime(your field datacolumn , DateFormat.ShortDate)

    replace the data expression in report with above expression.

    put your data field column at place of bold place.

    Tuesday, March 4, 2014 11:13 AM
  • you can apply format function to show just the date

    ie like below

    FormatDateTime(Fields!DateField.Value,2)
    or
    Format(Fields!DateField.Value,”dd/MM/yyyy”)
    etc 

    depending on what format you want

    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    Tuesday, March 4, 2014 11:15 AM
  • Hi,

    You can also try like this ,

    =FormatDateTime(Now, DateFormat.ShortDate) 
    =CDate(Now).ToString("dd/MM/yyyy")
    

    Also try this link - http://thavash.wordpress.com/2007/04/10/working-with-dates-in-reporting-services/

    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

    Tuesday, March 4, 2014 11:35 AM

All replies

  • Hello Rhythm,

    can you try this.

    =FormatDateTime(your field datacolumn , DateFormat.ShortDate)

    replace the data expression in report with above expression.

    put your data field column at place of bold place.

    Tuesday, March 4, 2014 11:13 AM
  • you can apply format function to show just the date

    ie like below

    FormatDateTime(Fields!DateField.Value,2)
    or
    Format(Fields!DateField.Value,”dd/MM/yyyy”)
    etc 

    depending on what format you want

    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    Tuesday, March 4, 2014 11:15 AM
  • Hi,

    You can also try like this ,

    =FormatDateTime(Now, DateFormat.ShortDate) 
    =CDate(Now).ToString("dd/MM/yyyy")
    

    Also try this link - http://thavash.wordpress.com/2007/04/10/working-with-dates-in-reporting-services/

    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

    Tuesday, March 4, 2014 11:35 AM