Jun 20, 2005 #1 3543e6 Technical User Feb 22, 2002 4 NL Hi, I'm using crystal 8.5 and i want to add two timefields with each other. For instance: starttime 8:20 duration 1:46 result should be 10:06 and it should also be a timefield like starttime and duration. Can anyone help me with this? Thanks
Hi, I'm using crystal 8.5 and i want to add two timefields with each other. For instance: starttime 8:20 duration 1:46 result should be 10:06 and it should also be a timefield like starttime and duration. Can anyone help me with this? Thanks
Jun 20, 2005 #2 Madawc Programmer Sep 5, 2002 7,628 GB Surprisingly, the command is DateAdd. The database I work on doesn't use time, but DateAdd ("n", duration, starttime) should do it. Madawc Williams (East Anglia, UK) Upvote 0 Downvote
Surprisingly, the command is DateAdd. The database I work on doesn't use time, but DateAdd ("n", duration, starttime) should do it. Madawc Williams (East Anglia, UK)
Jun 20, 2005 #3 lbass Technical User Feb 9, 2002 32,816 US First convert {table.duration} into minutes by creating a formula {@duration}: hour({table.duration})*60 + minute({table.duration}) Then use the dateadd function like this, since it requires a datefield: time(dateadd("n",{@duration},datetime(currentdate,{table.starttime}))) -LB Upvote 0 Downvote
First convert {table.duration} into minutes by creating a formula {@duration}: hour({table.duration})*60 + minute({table.duration}) Then use the dateadd function like this, since it requires a datefield: time(dateadd("n",{@duration},datetime(currentdate,{table.starttime}))) -LB
Jun 21, 2005 Thread starter #4 3543e6 Technical User Feb 22, 2002 4 NL lbass, Thanks for your respons. That did it for us. Great!! regards, 3543e6 Upvote 0 Downvote