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
>
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
~~~
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
> 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
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
> 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
> 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
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
- 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
, 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
]
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&
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
> 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
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
> 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
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().
>
>
>
> 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
#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
@ 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
> 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
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
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
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:
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 &
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
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
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:
/
> -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 ...,
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
=
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
_
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
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
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
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
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
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
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
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
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
39 matches
Mail list logo