Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: HELP I need a formula for a time duration Post Reply Post New Topic
Page  of 3 Next >>
Author Message
fairy princess
Newbie
Newbie
Avatar

Joined: 15 Aug 2008
Location: United Kingdom
Online Status: Offline
Posts: 21
Quote fairy princess Replybullet Topic: HELP I need a formula for a time duration
    Posted: 15 Aug 2008 at 5:05am
  PLease can anyone help me i need a formula for a time duration
 
vrAttendance.SeenTime  vrAttendance.FinishTime to give a duration
 
For give me for not knowing as i is blonde
Please can anyone help me
 
Many Thanks XX
Many Thanks the tooth fairy
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 15 Aug 2008 at 5:19am
Hi,
 
Can you post some sample data for
 
Seentime    Finishtime
 
does these fields have date in them or just time?
 
Cheers
Rahul
IP IP Logged
fairy princess
Newbie
Newbie
Avatar

Joined: 15 Aug 2008
Location: United Kingdom
Online Status: Offline
Posts: 21
Quote fairy princess Replybullet Posted: 15 Aug 2008 at 7:00am
  hi
Attendance Date                   Seentime    Finishtime  
   01/05/2007                           09.00           09.55    
 
many thanks
xx
Many Thanks the tooth fairy
IP IP Logged
fairy princess
Newbie
Newbie
Avatar

Joined: 15 Aug 2008
Location: United Kingdom
Online Status: Offline
Posts: 21
Quote fairy princess Replybullet Posted: 15 Aug 2008 at 7:01am
  it has time attentance is date
Many Thanks the tooth fairy
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 15 Aug 2008 at 7:11am

Hi

Create a formula as

Frm_TimeDiff

and enter the code below

vrAttendance.FinishTime -vrAttendance.SeenTime 

Once done place the formula in details section next to finishtime
 
output 0.55
 
Cheers
Rahul


Edited by rahulwalawalkar - 15 Aug 2008 at 7:13am
IP IP Logged
fairy princess
Newbie
Newbie
Avatar

Joined: 15 Aug 2008
Location: United Kingdom
Online Status: Offline
Posts: 21
Quote fairy princess Replybullet Posted: 15 Aug 2008 at 7:22am
hi
I went to formula fields
right click , new
call Frm_TimeDiff
entered code
it says
 
 
a number curreny date is needed
Help i so lost
Many Thanks the tooth fairy
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 15 Aug 2008 at 7:57am
Hi
 
use the code below
 

tonumber({vrAttendance.FinishTime}) - tonumber({vrAttendance.SeenTime} )

 
will work let me know
 
cheers
rahul
IP IP Logged
fairy princess
Newbie
Newbie
Avatar

Joined: 15 Aug 2008
Location: United Kingdom
Online Status: Offline
Posts: 21
Quote fairy princess Replybullet Posted: 15 Aug 2008 at 8:04am

hi

i used the code and i check its was ok . place it in details
in pop up error message The string is non-numeric
 
i do hope u can help xxx
 
Many Thanks the tooth fairy
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 15 Aug 2008 at 8:10am
--

Edited by rahulwalawalkar - 15 Aug 2008 at 8:21am
IP IP Logged
fairy princess
Newbie
Newbie
Avatar

Joined: 15 Aug 2008
Location: United Kingdom
Online Status: Offline
Posts: 21
Quote fairy princess Replybullet Posted: 15 Aug 2008 at 8:16am
hi
seentime :string      Finishtime:string   (lenght5)
 
i usin crystal reports 10
and using ODBC(RDO) data base
Many Thanks the tooth fairy
IP IP Logged
Page  of 3 Next >>
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.