|
-
Dec 14th, 2006, 11:48 PM
#1
Thread Starter
PowerPoster
Crystal Report ?
I am using Crystal Report 8.5. I am trying to do a computation on a database field. The field is defined as a text field in the form of time; 00:00:34 (34 seconds). What I am trying to do is create a formula that sums the values in this field and I'm not sure how to do this or if it's even possible. The only function I saw that made any sense was the "DateAdd" but I don't believe that will work.
Hope I've explained myself well enough.
Thanks,
-Blake
Last edited by blakemckenna; Dec 14th, 2006 at 11:51 PM.
Blake
-
Dec 15th, 2006, 11:11 AM
#2
Re: Crystal Report ?
You could use CDate() on the string to convert it to Date type data before you use it in any computation.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Dec 15th, 2006, 11:53 AM
#3
Thread Starter
PowerPoster
Re: Crystal Report ?
Al,
I've actually tried that...in fact, here's what the formula looked like:
Sum(CDate(mElapsedTime))
It didn't work because it was looking for a number. The format of mElapsedTime is 00:00:34 and it's stored as a Text field in an Access DB.
-
Dec 15th, 2006, 01:38 PM
#4
Re: Crystal Report ?
Use the CDateTime function. Then convert that into a number.
DateDiff("s",CDateTime("00:00:00"), CDateTime({mElapsedTime}))
-
Dec 15th, 2006, 01:57 PM
#5
-
Dec 15th, 2006, 02:08 PM
#6
Thread Starter
PowerPoster
Re: Crystal Report ?
Thanks Bruce...I'll give it a try!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|