Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: A pivot table for calculating duration per month Post Reply Post New Topic
Author Message
sophieTaureau
Newbie
Newbie


Joined: 26 Jan 2012
Online Status: Offline
Posts: 17
Quote sophieTaureau Replybullet Topic: A pivot table for calculating duration per month
    Posted: 19 Dec 2012 at 1:12am
Hello
I have one question about calculating duration of flight.
for example, one flight take off on 30 Nov 2012 at 9 pm, arrive on 1st Dec 2012 at 2am.
-------------------------------------------------------------------
N°Flt    |   DepartureTime        |      ArriveTime
----------------------------------------------------------
00001  |   11/30/2012 21:00   |     12/01/2012  2:00
-------------------------------------------------------------------
 
I want a pivot table to display like that:
-------------------------------
                |   Nov  |  Dec  |(hour)
-------------------------------
Duration   |     3    |   2    |
------------------------------
Thanks a lot a lot!


Edited by sophieTaureau - 19 Dec 2012 at 4:25am
IP IP Logged
ctwriter
Newbie
Newbie


Joined: 23 Dec 2012
Online Status: Offline
Posts: 8
Quote ctwriter Replybullet Posted: 23 Dec 2012 at 10:57am
Hi Sophie,
Try using DateDiff here to determine number of hours between two Dates and Times:
DateDiff(intervalType,startDateTime,endDateTime)
The intervalType would be "h" for hours.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.