Convert a data calculation into a string

I am taking the planned start/end dates and actual start/end dates and calculating the variance and I am ending up with results like 3.00:00:00.  I'd like to convert it to an integer or string so I can add "days" after it.  Formatting the textbox to a number doesn't help.  I tried Cint() but that didn't work either.  Can anyone tell me how to convert 3.00:00:00 into 3 please?

MS VS 2010
MS SQL Server 2008 R2

= ReportItems!ActualStartDate.Value - ReportItems!PlannedStartDate.Value

Open in new window

= CDate(ReportItems!PlannedEndDate.Value) - Cdate(ReportItems!ActualEndDate.Value)

Open in new window

HSI_guelphAsked:
Who is Participating?
 
Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
... and making it a string...
=CStr(DateDiff("d", ReportItems!ActualStartDate.Value, ReportItems!PlannedStartDate.Value)) + " days"

Open in new window

0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Give this a whirl..
=DateDiff("d", ReportItems!ActualStartDate.Value, ReportItems!PlannedStartDate.Value)

Open in new window

0
 
HSI_guelphAuthor Commented:
@jimhorn - the first one gave me (3), lol.  The second one gave me -3 days so maybe if I switch the order I can get a positive number.  

Swapping the items gave me 3 days.  Thank you very much!!
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Thanks for the grade.  Have fun doing SSRS expressions.  -Jim
0
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.