Re: Date Query problem.

2001-06-08 Thread Dusty Tinashe Shoko

Typeless huh!
Intersting
- Original Message -
From: Andy Ewings <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Thursday, June 07, 2001 5:17 PM
Subject: RE: Date Query problem.


> CF doesn't deal with variables in this way. If you do  DateFormat(now(),"dd")> then a is neither a string, number or date.  CF
> decides what type the variable is once you combine it with an operand  For
> example if you tried to do a mathematical function on it (say add it to
> another number) then this would be fine.  If you tried to concatenate it
to
> a string then this would also be ok.
>
> -Original Message-
> From: Dusty Tinashe Shoko [mailto:[EMAIL PROTECTED]]
> Sent: 07 June 2001 15:32
> To: CF-Talk
> Subject: Re: Date Query problem.
>
>
> .
> 
> .
>
> is variable 'a' a date or a number now?
> Why dont u add to the date first and then get the day afterwards
>
> - Original Message -
> From: Schwartz, Paul <[EMAIL PROTECTED]>
> To: CF-Talk <[EMAIL PROTECTED]>
> Sent: Wednesday, June 06, 2001 6:03 PM
> Subject: Date Query problem.
>
>
> > I have a query of a database that I am doing so that it shows the
> > results for the next seven days.
> > this script works up until the end of the month. when it just adds on
> > to the end of the month.
> > for example. may 27,28,29,30,31,32,33 instead of changing to the next
> > month and starting over again at the next month. any Ideas would be
> > helpful.
> >
> >
> > database table format
> > month,day,name
> >
> >
> > thanks,
> >
> >  > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > select month,day,year,who
> > from on_callmic
> > where month = #thismonth# and day = #A# OR
> > month = #thismonth# and day = #B# OR
> > month = #thismonth# and day = #C# OR
> > month = #thismonth# and day = #D# OR
> > month = #thismonth# and day = #E# OR
> > month = #thismonth# and day = #F# or
> > month = #thismonth# and day = #g#
> > order by month
> > 
> > >
> >  > style="background-color:white;border:none">
> >  > #oncall.day# & "/" & #oncall.year#> on
> > #Dateformat(td1, " - mmm/dd/")# #who# is Manager in
> > Charge. 
> >
> >
> > Paul Schwartz
> > Information Systems Technician / Webmaster
> > Regional Medical Lab
> > mailto:[EMAIL PROTECTED]
> >
> > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> >
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Date Query problem.

2001-06-07 Thread Jones, Matt

Basically what I would do (based on your db structure)

but why would you store the date as separate fields?





 select month,day,year,who
 from on_callmic
 where (month >= #month(begindate)# and day >= #Day(begindate)# and year >=
#Year(begindate)#)
 AND
(month <= #month(enddate)# and day <= #Day(enddate)# and year <=
#Year(enddate)#)
 order by year, month, day


 >
 
 
#Dateformat(CreateDate(year,month,day), " - mmm/dd/")#
 #who# is Manager in
Charge. 


-Original Message-
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 10:17 AM
To: CF-Talk
Subject: RE: Date Query problem.


CF doesn't deal with variables in this way. If you do  then a is neither a string, number or date.  CF
decides what type the variable is once you combine it with an operand  For
example if you tried to do a mathematical function on it (say add it to
another number) then this would be fine.  If you tried to concatenate it to
a string then this would also be ok.

-Original Message-
From: Dusty Tinashe Shoko [mailto:[EMAIL PROTECTED]]
Sent: 07 June 2001 15:32
To: CF-Talk
Subject: Re: Date Query problem.


..

..

is variable 'a' a date or a number now?
Why dont u add to the date first and then get the day afterwards

- Original Message - 
From: Schwartz, Paul <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Wednesday, June 06, 2001 6:03 PM
Subject: Date Query problem.


> I have a query of a database that I am doing so that it shows the
> results for the next seven days.
> this script works up until the end of the month. when it just adds on
> to the end of the month.
> for example. may 27,28,29,30,31,32,33 instead of changing to the next
> month and starting over again at the next month. any Ideas would be
> helpful.
> 
> 
> database table format
> month,day,name
> 
> 
> thanks,
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> select month,day,year,who
> from on_callmic
> where month = #thismonth# and day = #A# OR 
> month = #thismonth# and day = #B# OR 
> month = #thismonth# and day = #C# OR
> month = #thismonth# and day = #D# OR 
> month = #thismonth# and day = #E# OR 
> month = #thismonth# and day = #F# or 
> month = #thismonth# and day = #g#
> order by month
> 
> >
>  style="background-color:white;border:none">
>  #oncall.day# & "/" & #oncall.year#> on
> #Dateformat(td1, " - mmm/dd/")# #who# is Manager in
> Charge. 
> 
> 
> Paul Schwartz
> Information Systems Technician / Webmaster
> Regional Medical Lab
> mailto:[EMAIL PROTECTED]
> 
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Date Query problem.

2001-06-07 Thread Andy Ewings

CF doesn't deal with variables in this way. If you do  then a is neither a string, number or date.  CF
decides what type the variable is once you combine it with an operand  For
example if you tried to do a mathematical function on it (say add it to
another number) then this would be fine.  If you tried to concatenate it to
a string then this would also be ok.

-Original Message-
From: Dusty Tinashe Shoko [mailto:[EMAIL PROTECTED]]
Sent: 07 June 2001 15:32
To: CF-Talk
Subject: Re: Date Query problem.


.

.

is variable 'a' a date or a number now?
Why dont u add to the date first and then get the day afterwards

- Original Message - 
From: Schwartz, Paul <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Wednesday, June 06, 2001 6:03 PM
Subject: Date Query problem.


> I have a query of a database that I am doing so that it shows the
> results for the next seven days.
> this script works up until the end of the month. when it just adds on
> to the end of the month.
> for example. may 27,28,29,30,31,32,33 instead of changing to the next
> month and starting over again at the next month. any Ideas would be
> helpful.
> 
> 
> database table format
> month,day,name
> 
> 
> thanks,
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> select month,day,year,who
> from on_callmic
> where month = #thismonth# and day = #A# OR 
> month = #thismonth# and day = #B# OR 
> month = #thismonth# and day = #C# OR
> month = #thismonth# and day = #D# OR 
> month = #thismonth# and day = #E# OR 
> month = #thismonth# and day = #F# or 
> month = #thismonth# and day = #g#
> order by month
> 
> >
>  style="background-color:white;border:none">
>  #oncall.day# & "/" & #oncall.year#> on
> #Dateformat(td1, " - mmm/dd/")# #who# is Manager in
> Charge. 
> 
> 
> Paul Schwartz
> Information Systems Technician / Webmaster
> Regional Medical Lab
> mailto:[EMAIL PROTECTED]
> 
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Date Query problem.

2001-06-07 Thread Dusty Tinashe Shoko





is variable 'a' a date or a number now?
Why dont u add to the date first and then get the day afterwards

- Original Message - 
From: Schwartz, Paul <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Wednesday, June 06, 2001 6:03 PM
Subject: Date Query problem.


> I have a query of a database that I am doing so that it shows the
> results for the next seven days.
> this script works up until the end of the month. when it just adds on
> to the end of the month.
> for example. may 27,28,29,30,31,32,33 instead of changing to the next
> month and starting over again at the next month. any Ideas would be
> helpful.
> 
> 
> database table format
> month,day,name
> 
> 
> thanks,
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> select month,day,year,who
> from on_callmic
> where month = #thismonth# and day = #A# OR 
> month = #thismonth# and day = #B# OR 
> month = #thismonth# and day = #C# OR
> month = #thismonth# and day = #D# OR 
> month = #thismonth# and day = #E# OR 
> month = #thismonth# and day = #F# or 
> month = #thismonth# and day = #g#
> order by month
> 
> >
>  style="background-color:white;border:none">
>  #oncall.day# & "/" & #oncall.year#> on
> #Dateformat(td1, " - mmm/dd/")# #who# is Manager in
> Charge. 
> 
> 
> Paul Schwartz
> Information Systems Technician / Webmaster
> Regional Medical Lab
> mailto:[EMAIL PROTECTED]
> 
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> 


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Date Query problem.

2001-06-06 Thread Alan Comeau

how about using the dateadd function as in



Alan Comeau
Vardus Ltd
[EMAIL PROTECTED]


- Original Message - 
From: "Schwartz, Paul" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, June 06, 2001 5:03 PM
Subject: Date Query problem.


> I have a query of a database that I am doing so that it shows the
> results for the next seven days.
> this script works up until the end of the month. when it just adds on
> to the end of the month.
> for example. may 27,28,29,30,31,32,33 instead of changing to the next
> month and starting over again at the next month. any Ideas would be
> helpful.
> 
> 
> database table format
> month,day,name
> 
> 
> thanks,
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> select month,day,year,who
> from on_callmic
> where month = #thismonth# and day = #A# OR 
> month = #thismonth# and day = #B# OR 
> month = #thismonth# and day = #C# OR
> month = #thismonth# and day = #D# OR 
> month = #thismonth# and day = #E# OR 
> month = #thismonth# and day = #F# or 
> month = #thismonth# and day = #g#
> order by month
> 
> >
>  style="background-color:white;border:none">
>  #oncall.day# & "/" & #oncall.year#> on
> #Dateformat(td1, " - mmm/dd/")# #who# is Manager in
> Charge. 
> 
> 
> Paul Schwartz
> Information Systems Technician / Webmaster
> Regional Medical Lab
> mailto:[EMAIL PROTECTED]
> 
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> 


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Date Query problem.

2001-06-06 Thread Diana Nichols

try this: 



etc


select month,day,year,who
from on_callmic
where year = #year(now()# and
( (#month = month(dayone)# and day=#day(dayone)#)
or (#month = month(daytwo)# and day=#day(daytwo)#)
or (#month = month(daythree)# and day=#day(daythree)#) )
etc.

HTH
D



-Original Message-
From: Schwartz, Paul [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 06, 2001 12:03 PM
To: CF-Talk
Subject: Date Query problem.


I have a query of a database that I am doing so that it shows the
results for the next seven days.
this script works up until the end of the month. when it just adds on
to the end of the month.
for example. may 27,28,29,30,31,32,33 instead of changing to the next
month and starting over again at the next month. any Ideas would be
helpful.


database table format
month,day,name


thanks,



 on
#Dateformat(td1, " - mmm/dd/")# #who# is Manager in
Charge. 


Paul Schwartz
Information Systems Technician / Webmaster
Regional Medical Lab
mailto:[EMAIL PROTECTED]

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists