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

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

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 with datediff

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

2004-03-24 Thread Tony Weeg
:30 PM To: CF-Talk Subject: RE: Quick Question, 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

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

2004-03-24 Thread Jeff Small
so lets say start time was today, now(). cfset beginTime = dateDiff('s','01/01/1970 00:00:00.000',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

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(). cfset beginTime

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 @ this

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

2004-03-24 Thread Tony Weeg
: 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 in the futureto get seconds in between two

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

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

2004-03-24 Thread Tony Weeg
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 the final application

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

2004-03-24 Thread Steve Nelson
: 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 datatype to use to calculate time

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

2004-03-24 Thread Tony Weeg
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 here

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 these tables. tasks -- id allottedTime(int) [keep

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

2004-03-24 Thread Tony Weeg
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: Tony Weeg [EMAIL

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 that

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... Let's

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

2004-03-24 Thread Tony Weeg
: 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 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

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

2004-03-24 Thread Jeff Small
well...yeah... select name = hours option value=36001 option value=72002 /select 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... select name = minutes option value=601 option value=1202 /select

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/time