Re: Time Calculation

2006-01-09 Thread Michael Traher
Use the createtime(hh,mm,ss) function so that CF creates a proper time variable. so you can then use any if the date/time functions on these variables. HTH Mike On 1/9/06, Love Sponge <[EMAIL PROTECTED]> wrote: > > I am developing a form where the user selects a start and end time from a >

Time Calculation

2006-01-09 Thread Love Sponge
I am developing a form where the user selects a start and end time from a drop down box. the goal is to use both times to calcualte the logon duration. Can anyone tell me what is the best way to go about representing these time in order to use them for calculation. Thanks ~~~

RE: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Tony Weeg
s'all good man, good luck, and if you need that cfc secondsToTime I can forward that on to ya! later. -Original Message- From: Jeff Small [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 2:41 PM To: CF-Talk Subject: Re: Quick Question, RE: Datatype and future date

Re: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Jeff Small
> well...yeah... > > > 1 > > Okay, see, that was my question, how do I set the "values" of the hours and minutes. Easy enough, just pass the number of seconds...gotcha... > > 1 > 2 > > > then just add up > > > > :) tony Once again, it was harder in my head than you've made it here on "pape

RE: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Tony Weeg
well...yeah... 1 1 2 then just add up :) tony -Original Message- From: Jeff Small [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 2:30 PM To: CF-Talk Subject: Re: Quick Question, RE: Datatype and future date/time calculation > Totally, you've been a

Re: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Jeff Small
> Totally, you've been a terrific help. I hope this helped others as much as > it helped me. Oh yeah, one more thing, regarding how *they've* decided *they* want the interface, which is sort of dictating my database design...I have no problem with it, I just want to make sure it's "do-able"... Le

Re: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Jeff Small
> that's fine...so don't have beginTime and endTime just have timeOnTask, and > let them enter what they want, and translate that into seconds in the cf > code... > > I use beginTime and endTime, in a web application because, I capture them > logging in, and logging out, therefore I can interpret t

RE: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Tony Weeg
and then match that up against actualTime make sense? tony -Original Message- From: Jeff Small [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 2:16 PM To: CF-Talk Subject: Re: Quick Question, RE: Datatype and future date/time calculation - Original Message - From: &quo

Re: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Jeff Small
- Original Message - From: "Tony Weeg" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, March 24, 2004 1:48 PM Subject: RE: Quick Question, RE: Datatype and future date/time calculation > ok... > > I would have

RE: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Tony Weeg
, 2004 1:49 PM To: CF-Talk Subject: RE: Quick Question, RE: Datatype and future date/time calculation ok... I would have these tables. tasks -- id allottedTime  (int) [keep as seconds] status (int) (complete/not complete) (1 or 0) actualTimeSpent (int) [seconds] (you could write total seconds

RE: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Steve Nelson
]   Sent: Wednesday, March 24, 2004 1:42 PM   To: CF-Talk   Subject: Re: Quick Question, RE: Datatype and future date/time calculation   > you may have posted already, but a quick run-down of the final   > application...   Oh, I'm just looking for what would be considered the "best&

RE: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Tony Weeg
e top of my head. hth tony -Original Message- From: Jeff Small [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 1:42 PM To: CF-Talk Subject: Re: Quick Question, RE: Datatype and future date/time calculation > you may have posted already, but a quick run-down of t

Re: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Jeff Small
> you may have posted already, but a quick run-down of the final > application... Oh, I'm just looking for what would be considered the "best" datatype to use to calculate time spent doing a task. A Task, which is stored in a task table, has a certain amount of "time" attached to it (TimeAllocated

RE: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Tony Weeg
estion, RE: Datatype and future date/time calculation > use seconds in an integer field... > they are easier to work with > > using epoch time (01/01/1970 00:00:00.000) > > you can use that as a base, and do dateDiff's and dateAdd's using > (now()) or a date i

Re: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Jeff Small
> use seconds in an integer field... > they are easier to work with > > using epoch time (01/01/1970 00:00:00.000) > > you can use that as a base, and do dateDiff's and dateAdd's using (now()) > or a date in the futureto get seconds in between two events... > > if you need more code to look

RE: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Tony Weeg
no problem...let me know. tony -Original Message- From: Jeff Small [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 1:19 PM To: CF-Talk Subject: Re: Quick Question, RE: Datatype and future date/time calculation > so lets say start time was today, now(). > > >

Re: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Jeff Small
> so lets say start time was today, now(). > > > > that will give you a value something like this > > 1080131574 > > throw that into an integer column called beginTime > > and you can translate that back to a "human readable" date time like this > > > > which will return > > {ts '2004-03-24 1

RE: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Tony Weeg
#x27;} and you can dress that up with... dateFormat() as you know im sure. tony -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 12:30 PM To: CF-Talk Subject: RE: Quick Question, RE: Datatype and future date/time calculation use seconds

RE: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Tony Weeg
@ this to make sense of what im trying to explain let me know... tony -Original Message- From: Jeff Small [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 12:27 PM To: CF-Talk Subject: Re: Quick Question, RE: Datatype and future date/time calculation > Use datetime datatypes

Re: Quick Question, RE: Datatype and future date/time calculation

2004-03-24 Thread Jeff Small
> Use datetime datatypes with datediff/dateadd functions. Will date time allow me to "insert" dates/times that are larger than 24 hours? I mean, no harm in trying, of course... I was actually planning on taking advantage of datediff/dateadd, that's why I was hoping a datetime datatype would suffi

RE: Quick Question, RE: Datatype and future date/time calculation s

2004-03-24 Thread Bosky, Dave
Use datetime datatypes with datediff/dateadd functions. -Original Message- From: Jeff Small [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 11:58 AM To: CF-Talk Subject: Quick Question, RE: Datatype and future date/time calculations Let's say a table was going to contain "Allo

Re: Time calculation

2002-09-29 Thread Brian Scandale
At 01:45 PM 9/26/02, you wrote: >I have two date and time fields, start and end. I want find the difference >and i want to display the difference as days:hrs:mins:secs what is the best >way to do that... ? > >Right now i use hour minute and second (built in functions) and those work >find for d

RE: Time calculation

2002-09-27 Thread Mosh Teitelbaum
September 27, 2002 6:58 AM > To: CF-Talk > Subject: RE: Time calculation > > > I think you want integer division: "\" > > > -Original Message- > > From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, September 26, 2002 8:

RE: Time calculation

2002-09-27 Thread Everett, Al
I think you want integer division: "\" > -Original Message- > From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 8:26 PM > To: CF-Talk > Subject: RE: Time calculation > > > Crap. > > Change all of the &

RE: Time calculation

2002-09-26 Thread Mosh Teitelbaum
Mosh Teitelbaum wrote: > > Got one of these for SQL Server? > From: Jochem van Dieten [mailto:[EMAIL PROTECTED]] > You mean it doesn't work? You should really get a better database :-) You mean MS Access? I don't think it'll work in that either 8^). -- Mosh Teitelbaum evoch, LLC Tel: (301) 62

RE: Time calculation

2002-09-26 Thread Sicular, Alexander
i use this for hr min output : HR " & "" & NumberFormat((DateDiff('n', StartTime, StopTime) MOD 60),'00') & " MIN"> adjust to taste. gl, alex -Original Message- From: John Gedeon [mailto:[EMAIL PROTECTED]] Sent: Th

RE: Time calculation

2002-09-26 Thread John Gedeon
t;evoch, LLC >Tel: (301) 625-9191 >Fax: (301) 933-3651 >Email: [EMAIL PROTECTED] >WWW: http://www.evoch.com/ > > > > -Original Message- > > From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, September 26, 2002 6:32 PM > > To:

RE: Time calculation

2002-09-26 Thread Mosh Teitelbaum
/ > -Original Message- > From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 6:32 PM > To: CF-Talk > Subject: RE: Time calculation > > > DateDiff() by itself is not enough. It can tell you the > difference in days > OR hours OR ...,

Re: Time calculation

2002-09-26 Thread Jochem van Dieten
John Gedeon wrote: > I tried your sql statement in my oracle db and it said it was missing a > right parenthesis Oeps, sorry. start and end are reserved words and require double quotes. With them, it works like below: test1=# select version(); version =

Re: Time calculation

2002-09-26 Thread Jochem van Dieten
John Gedeon wrote: > I tried your sql statement in my oracle db and it said it was missing a > right parenthesis Oeps, sorry. start and end are reserved words and require double quotes. With them, it works like below: test1=# select version(); version _

Re: Time calculation

2002-09-26 Thread John Gedeon
I tried your sql statement in my oracle db and it said it was missing a right parenthesis At 01:35 AM 9/27/2002 +0200, you wrote: >Mosh Teitelbaum wrote: > > Got one of these for SQL Server? > >You mean it doesn't work? You should really get a better database :-) > >I presume the SQL Server manu

Re: Time calculation

2002-09-26 Thread Jochem van Dieten
Mosh Teitelbaum wrote: > Got one of these for SQL Server? You mean it doesn't work? You should really get a better database :-) I presume the SQL Server manual has a compliance list for SQL functionality as defined in SQL:1999. You probably need to look for workarounds for feature F052 (interv

RE: Time calculation

2002-09-26 Thread Mosh Teitelbaum
2 5:36 PM > To: CF-Talk > Subject: Re: Time calculation > > > John Gedeon wrote: > > I have two date and time fields, start and end. I want find the > difference > > and i want to display the difference as days:hrs:mins:secs what > is the best > > way to d

RE: Time calculation

2002-09-26 Thread Mosh Teitelbaum
2 4:45 PM > To: CF-Talk > Subject: Time calculation > > > I have two date and time fields, start and end. I want find the > difference > and i want to display the difference as days:hrs:mins:secs what > is the best > way to do that... ? > > Right now i use hour minute a

RE: Time calculation

2002-09-26 Thread John Gedeon
Thanks At 05:19 PM 9/26/2002 -0400, you wrote: >DateDiff(datepart, date1, date2) > > > > > -Original Message- > > From: John Gedeon [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, September 26, 2002 3:45 PM > > To: CF-Talk > > Subject: Time ca

Re: Time calculation

2002-09-26 Thread Nick Han
DateDiff()? or maybe I misunderstood your question. Nick Han >>> [EMAIL PROTECTED] 09/26/02 01:45PM >>> I have two date and time fields, start and end. I want find the difference and i want to display the difference as days:hrs:mins:secs what is the best way to do that... ? Right now i use h

Re: Time calculation

2002-09-26 Thread Jochem van Dieten
John Gedeon wrote: > I have two date and time fields, start and end. I want find the difference > and i want to display the difference as days:hrs:mins:secs what is the best > way to do that... ? > > Right now i use hour minute and second (built in functions) and those work > find for differen

RE: Time calculation

2002-09-26 Thread Chad
DateDiff(datepart, date1, date2) > -Original Message- > From: John Gedeon [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 26, 2002 3:45 PM > To: CF-Talk > Subject: Time calculation > > I have two date and time fields, start and end. I want find the diffe

Time calculation

2002-09-26 Thread John Gedeon
I have two date and time fields, start and end. I want find the difference and i want to display the difference as days:hrs:mins:secs what is the best way to do that... ? Right now i use hour minute and second (built in functions) and those work find for differences less than one day but they