4

I have two datetime fields and I need to show the difference between them. I've used this expression to calculate it:

=DateDiff("n", Fields!hra_atncion.Value, Fields!fcha_incio.Value)

The result column should be on HH:mm, but the result is a Long expression type. Something like 428011156

Any answer will be apreciated!

UPDATE 21/11/2013

How I obtain the time difference in minutes between 12-11-2013 20:00 and 14-11-2013 08:00 ?

joisman
  • 89
  • 2
  • 10

1 Answers1

5

I think, you should try this expression:

=Datediff("h",Fields!StartDate.value,Fields!EndDate.value) & ":" & Datediff("n",Fields!StartDate.value,Fields!EndDate.value) mod 60
Bumptious Q Bangwhistle
  • 4,689
  • 2
  • 34
  • 43
swathi
  • 346
  • 4
  • 9
  • 2
    I was typing up a similar answer. The one improvement I suggest is to add .ToString("00") to the second half to force two digits all the time: `=Datediff("h",Fields!StartDate.value,Fields!EndDate.value) & ":" & (Datediff("n",Fields!StartDate.value,Fields!EndDate.value) mod 60).ToString("00")` – Jamie F Nov 20 '13 at 01:46