Log in Register FAQ Memberlist Search ContactReview Forum Index
A GoldMine Discussion and Support Community

ContactReview Forum Index » GoldBox » calculation the duration based on start and end time
Post new topic  Reply to topic View previous topic :: View next topic 
calculation the duration based on start and end time
PostPosted: Thu Mar 06, 2008 8:56 pm Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




Hello all,

I hope this finds you well. I would be most grateful if you could help me on this one.

I am importing in appts to the calender based on a dbf file

The appt has a start and end time in the dbf file it doesnt have a duration so what should i use to create the duration

I can make then both 24 hours and take the end time from the start time. but it doesnt seem to work so if start time was 1000am and end time was 1400pm i should get 4 hours right.

All responses are gratefully welcomed
Thanks
Una
View user's profile Send private message

PostPosted: Fri Mar 07, 2008 10:51 am Points: 0 Reply with quote
BobTaylor
GoldBox Guru
Joined: 07 Sep 2007
Posts: 1216
Location: Jacksonville, FL




I don't believe the functions exist within GoldBox to do this.

_________________
Bob Taylor
Bob Taylor Consulting
(904)646-9861
www.goldboxbob.com
Consulting with GoldBox and GoldMine since 1997.
View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Sun Mar 09, 2008 11:43 pm Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




What a shame,

I would have thought it was a basic requirement Sad. Thanks for your help bob anyhow

Una
View user's profile Send private message

PostPosted: Mon Mar 10, 2008 3:03 am Points: 0 Reply with quote
BobTaylor
GoldBox Guru
Joined: 07 Sep 2007
Posts: 1216
Location: Jacksonville, FL




I agree. This is one of those times that you could ask Dave to make a function. Might help, might not; but worth the try, I think.

_________________
Bob Taylor
Bob Taylor Consulting
(904)646-9861
www.goldboxbob.com
Consulting with GoldBox and GoldMine since 1997.
View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Mar 10, 2008 4:57 am Points: 0 Reply with quote
BobTaylor
GoldBox Guru
Joined: 07 Sep 2007
Posts: 1216
Location: Jacksonville, FL




After thinking about it a bit, I realize that the situation you are describing is the exception, not the rule. You say you have records that have two times in them; that never happens with GoldMine. It's always a Start Time plus a Duration (GoldMine actually times the duration with a clock, rather than calculating it). I don't believe there are any GoldMine records, in any table, that have two Time fields for the same event.

Not saying GoldBox shouldn't have a function to deal with your situation; but I think you can understand that it may not have been requested before.

_________________
Bob Taylor
Bob Taylor Consulting
(904)646-9861
www.goldboxbob.com
Consulting with GoldBox and GoldMine since 1997.
View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Mar 10, 2008 1:24 pm Points: 0 Reply with quote
bgannett
GoldMine Guru
Joined: 07 Sep 2007
Posts: 1820
Location: Pacific NorthWest




Also, with the proper settings, GM 6.7 (and maybe earlier) will automatically start the timer and put the elapsed time in the duration field when the call is completed.

_________________
Bob Gannett
253-627-2244
goldsupport@harbornet.com
*** Providing AFFORDABLE GoldMine Supportsince 1990
View user's profile Send private message

PostPosted: Mon Apr 07, 2008 7:49 pm Points: 0 Reply with quote
GoldBoxGodfather
Experienced Miner
Joined: 07 Sep 2007
Posts: 76
Location: Tinsel Town




Hi Una -

Could you give me the EXACT format of these times in your Source table (and by that I mean the dBase table that the CSV is converted into). Also, are Dates involved, or are these Calendar activities always to take place in the same day?

_________________
Regards,

Dave Petonic
Redstone SoftBase Company
www.redstonesoftbase.com
redstone@earthlink.net
View user's profile Send private message Visit poster's website

PostPosted: Mon Apr 07, 2008 10:39 pm Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




Thanks Dave for your speedy reply,

I can send you the dbf if you like after its converted.

There is a date involved and there also is a start time and end time, it is not in 24hr, if you like i will send on the sample dbf to you so it makes a bit more sense.



Field 2 = March 6th
Field 3= 2008
Field 4 = 10:00 am
Field 5= 12:00 PM

Please email me if you need anything else
Thanks again for the prompt response
Una
View user's profile Send private message

PostPosted: Sun Apr 13, 2008 8:03 pm Points: 0 Reply with quote
GoldBoxGodfather
Experienced Miner
Joined: 07 Sep 2007
Posts: 76
Location: Tinsel Town




unaclancy wrote:
Thanks Dave for your speedy reply,

I can send you the dbf if you like after its converted.

There is a date involved and there also is a start time and end time, it is not in 24hr, if you like i will send on the sample dbf to you so it makes a bit more sense.

Field 2 = March 6th
Field 3= 2008
Field 4 = 10:00 am
Field 5= 12:00 PM

Please email me if you need anything else
Thanks again for the prompt response
Una

Duration in Calendar is a numeric, as MINUTES.

So, you'd have to write an expression, and use the Make24Hour() function in GoldBox to convert the am/pm time to 24-hour time. Multiply the hh portion by 60 in both times. Maybe something like:

((60 * Val(Left(Make24Hour("12:00 pm"), 2))) + Val(SubStr(Make24Hour("12:00 pm"), 3))) - ((60 * Val(Left(Make24Hour("10:00 am"), 2))) + Val(SubStr(Make24Hour("10:00 am"), 3)))

That works, just tested. You would just use your Table->Time fields in place of the literal times, of course, such as:

((60 * Val(Left(Make24Hour(Yourdata->Time2nd), 2))) + Val(SubStr(Make24Hour(Yourdata->Time2nd), 3))) - ((60 * Val(Left(Make24Hour(Yourdata->Time1st), 2))) + Val(SubStr(Make24Hour(Yourdata->Time1st), 3)))

_________________
Regards,

Dave Petonic
Redstone SoftBase Company
www.redstonesoftbase.com
redstone@earthlink.net
View user's profile Send private message Visit poster's website

PostPosted: Mon Apr 14, 2008 12:07 am Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




Thanks Dave,

it works like a charm. Thanks a million for taking the timeout to write it for me

Much appreciated
Una
View user's profile Send private message

calculation the duration based on start and end time
  ContactReview Forum Index » GoldBox
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 7 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic  


Brought to you by Castell Computers, Doug Castell, Admin
RSS Feed
Powered by phpBB © 2001-2004 phpBB Group
Theme created by Vjacheslav Trushkin