467,077 Members | 977 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,077 developers. It's quick & easy.

CrystalReport Time Diff

Hello Everyone
Sorry but my English is very littel.
In my application I use Crystal Reports. On report I have (in one row) to
dateTime. How in 3th column calculate difftime beetwen this value and
dispaly in format (hh:mm:ss).
Now a use DateDiff functiona but I have wrong format.

Thx for yours help
PawelR
Nov 17 '05 #1
  • viewed: 2399
Share:
4 Replies
Pawel,

You'll have to program a bit using Crystal Reports formula language. First
use DateDiff to obtain the difference between the two dates IN SECONDS, then
use arithmetic formulas in order to obtain the number of days, hours,
minutes and seconds in the difference, and finally build a string in the
format "20 04:15:05" with the temporary variables obtained.

Regards - Octavio

"PawelR" <pa************@poczta.onet.pl> escribió en el mensaje
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello Everyone
Sorry but my English is very littel.
In my application I use Crystal Reports. On report I have (in one row) to
dateTime. How in 3th column calculate difftime beetwen this value and
dispaly in format (hh:mm:ss).
Now a use DateDiff functiona but I have wrong format.

Thx for yours help
PawelR

Nov 17 '05 #2
Thx Octavio,
but I don't quite shure that this is good way. If I use your solution I have
in 3th column string value. If I have string I propabylity can't use
agregate function sum().
Ever rows in first column have start time, second end time and 3th diff
time. On the end my reports I must show total time in job.

Użytkownik "Octavio Hernandez" <do****@danysoft.com> napisał w wiadomości
news:%2****************@TK2MSFTNGP10.phx.gbl...
Pawel,

You'll have to program a bit using Crystal Reports formula language. First
use DateDiff to obtain the difference between the two dates IN SECONDS,
then use arithmetic formulas in order to obtain the number of days, hours,
minutes and seconds in the difference, and finally build a string in the
format "20 04:15:05" with the temporary variables obtained.

Regards - Octavio

"PawelR" <pa************@poczta.onet.pl> escribió en el mensaje
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello Everyone
Sorry but my English is very littel.
In my application I use Crystal Reports. On report I have (in one row) to
dateTime. How in 3th column calculate difftime beetwen this value and
dispaly in format (hh:mm:ss).
Now a use DateDiff functiona but I have wrong format.

Thx for yours help
PawelR


Nov 17 '05 #3
Pawel,

Make the 3rd column with the difference in seconds, and make it invisible
(Supress). You can sum that column easily. And then at the end of the report
use the formula to present the sum as a string " hh:mm:ss", right below the
4th column, which shows the "hh:mm:ss" for every job..

Regards - Octavio
"PawelR" <pa************@poczta.onet.pl> escribió en el mensaje
news:eB**************@TK2MSFTNGP15.phx.gbl...
Thx Octavio,
but I don't quite shure that this is good way. If I use your solution I
have in 3th column string value. If I have string I propabylity can't use
agregate function sum().
Ever rows in first column have start time, second end time and 3th diff
time. On the end my reports I must show total time in job.

Użytkownik "Octavio Hernandez" <do****@danysoft.com> napisał w wiadomości
news:%2****************@TK2MSFTNGP10.phx.gbl...
Pawel,

You'll have to program a bit using Crystal Reports formula language.
First use DateDiff to obtain the difference between the two dates IN
SECONDS, then use arithmetic formulas in order to obtain the number of
days, hours, minutes and seconds in the difference, and finally build a
string in the format "20 04:15:05" with the temporary variables obtained.

Regards - Octavio

"PawelR" <pa************@poczta.onet.pl> escribió en el mensaje
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello Everyone
Sorry but my English is very littel.
In my application I use Crystal Reports. On report I have (in one row)
to dateTime. How in 3th column calculate difftime beetwen this value and
dispaly in format (hh:mm:ss).
Now a use DateDiff functiona but I have wrong format.

Thx for yours help
PawelR



Nov 17 '05 #4
Thx Octavio,
Could you help me? I don't know how present the sum as string "hh:mm:ss".

Pawel
Użytkownik "Octavio Hernandez" <do****@danysoft.com> napisał w wiadomości
news:OH*************@TK2MSFTNGP15.phx.gbl...
Pawel,

Make the 3rd column with the difference in seconds, and make it invisible
(Supress). You can sum that column easily. And then at the end of the
report use the formula to present the sum as a string " hh:mm:ss", right
below the 4th column, which shows the "hh:mm:ss" for every job..

Regards - Octavio
"PawelR" <pa************@poczta.onet.pl> escribió en el mensaje
news:eB**************@TK2MSFTNGP15.phx.gbl...
Thx Octavio,
but I don't quite shure that this is good way. If I use your solution I
have in 3th column string value. If I have string I propabylity can't use
agregate function sum().
Ever rows in first column have start time, second end time and 3th diff
time. On the end my reports I must show total time in job.

Użytkownik "Octavio Hernandez" <do****@danysoft.com> napisał w wiadomości
news:%2****************@TK2MSFTNGP10.phx.gbl...
Pawel,

You'll have to program a bit using Crystal Reports formula language.
First use DateDiff to obtain the difference between the two dates IN
SECONDS, then use arithmetic formulas in order to obtain the number of
days, hours, minutes and seconds in the difference, and finally build a
string in the format "20 04:15:05" with the temporary variables
obtained.

Regards - Octavio

"PawelR" <pa************@poczta.onet.pl> escribió en el mensaje
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello Everyone
Sorry but my English is very littel.
In my application I use Crystal Reports. On report I have (in one row)
to dateTime. How in 3th column calculate difftime beetwen this value
and dispaly in format (hh:mm:ss).
Now a use DateDiff functiona but I have wrong format.

Thx for yours help
PawelR



Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Alberto Santini | last post: by
reply views Thread by s-galit | last post: by
2 posts views Thread by Vlatko | last post: by
3 posts views Thread by redneon | last post: by
2 posts views Thread by Don Wash | last post: by
6 posts views Thread by Jeremy Sanders | last post: by
9 posts views Thread by Ron Adam | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.