To Find Ellapse time in SSRS 2008
Hi, Any one pls tel me how to find the Ellapse time in SSRS 2008. Example Start date : 2010-07-08 05:58:58.000 End date : 2010-07-08 06:08:02.373 From the above how to find the Ellapse time of (End date - Start date) I have tried Format(Fields!EndTime.Value - Fields!StartTime.Value) But it is showing as wrongly. Kindly do help to me... Thanks in advance, Abdul2010
July 19th, 2010 1:43pm

Perhaps you can use DATEDIFF function in T-SQL?Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2010 1:59pm

Hi Uri, Can u pls tel me in SSRS with syntax..... Thanks , Abdul2010
July 19th, 2010 2:28pm

Try =DateDiff("h",Fields!EndTime.Value , Fields!StartTime.Value)Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2010 2:33pm

Hi Uri, I have used your format . =DateDiff("h",Fields!EndTime.Value , Fields!StartTime.Value) It is showing as 0. Pls tel me some other Correct format. Thanks , Abdul2010
July 19th, 2010 2:36pm

=Datediff("hh", Fields!StartTime.Value, Fields!EndTime.Value) Syntax =Datediff(Interval, startdate,enddate) Either way the datediff function will work. See link for more info: http://msdn.microsoft.com/en-us/library/ms189794.aspx
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2010 2:40pm

Hi, Try this.. if your start and end date are same, it returns 0 only.. use "d" for date difference "m" --> month "yyyy" --> year =DateDiff( "h",Globals!ExecutionTime ,"7/18/2010 3:13:50 PM") Regards, Gayathri devi P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)
July 19th, 2010 2:48pm

Hi Gayathri, It will work only for Hour checking.... I want to checkall Hour,Minutes,Seconds also. Pls tel me the suggestion....
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2010 3:25pm

Hi Gayathri, It will work only for Hour checking.... I want to checkall Hour,Minutes,Seconds also. Pls tel me the suggestion.... So, why isn't =Fields![EndDate].Value-Fields![StartDate].Value working for this?
July 19th, 2010 6:50pm

Hi, Try this.... = "Day : " & DateDiff("d",Globals!ExecutionTime , "7/18/2010 3:13:50 PM") & " Month :" & DateDiff("m",Globals!ExecutionTime , "7/18/2010 3:13:50 PM") & " Year : " & DateDiff("yyyy",Globals!ExecutionTime , "7/18/2010 3:13:50 PM") & " Hour : " & DateDiff("h",Globals!ExecutionTime , "7/18/2010 3:13:50 PM") & " Minutes : " & DateDiff("m",Globals!ExecutionTime , "7/18/2010 3:13:50 PM") & " Seconds : " & DateDiff("s",Globals!ExecutionTime , "7/18/2010 3:13:50 PM") Regards, Gayathri devi P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2010 7:31am

Hello, If you want the difference in hours minutes and seconds, try below expression ="Hours: " & CInt(DateDiff("s", Fields!StartDate.Value, Fields!EndDate.Value)/3600) & " Minutes: " & CInt(DateDiff("s", Fields!StartDate.Value, Fields!EndDate.Value)/60) & " Seconds: " & (DateDiff("s", Fields!StartDate.Value, Fields!EndDate.Value) Mod 60) Hope its helpful....Pavan Kokkula Infosys Technologies Limited.
July 20th, 2010 7:49am

Hi Abdul2010, Actually, the formula provided by PavanKokkula is correct. Here is more for your reference: =Datediff("h",Fields!StartDate.value,Fields!EndDate.value) & ":" & Datediff("n",Fields!StartDate.value,Fields!EndDate.value) mod 60 & ":" & Datediff("s",Fields!StartDate.value,Fields!EndDate.value) mod 60 the above expression will return hh:mm:ss, for example, 7:25:28 thanks, Jerry
Free Windows Admin Tool Kit Click here and download it now
July 22nd, 2010 5:06am

Hi I'm getting the output as 0:1:6 instead of 00:01:06. Any help pls..??- Kerobin
October 20th, 2010 2:28pm

This works fine. =(Fields!ENDTIME.Value-Fields!STARTTIME.Value) and change the text box properties->Number->and select Category: Time-> Type: 13:30 Pls note that i checked it on SSRS 2008.- Kerobin
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2010 11:09am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics