-
1. Re: Checks the complete date (mm/dd/yyyy) against another compelete date (mm/dd/yyyy)
Dan Bracuk Dec 6, 2012 4:54 AM (in response to userCold9)What kind of check are you talking about?
-
2. Re: Checks the complete date (mm/dd/yyyy) against another compelete date (mm/dd/yyyy)
Adam Cameron. Dec 6, 2012 5:10 AM (in response to userCold9)I think you might need to read the docs a bit more closely. From the docs for dateCompare():
datePart
Optional. String. Precision of the comparison.
- s Precise to the second (default)
- n Precise to the minute
- h Precise to the hour
- d Precise to the day
- m Precise to the month
- yyyy Precise to the year
Indeed, even by default its behaviour is not what you suggest it is.
--
Adam
-
3. Re: Checks the complete date (mm/dd/yyyy) against another compelete date (mm/dd/yyyy)
userCold9 Dec 6, 2012 7:18 AM (in response to Dan Bracuk)Check the complete date form a form against a complete date from a database table.
I would be check the date from the form against all the dates in the database table.
There would be two form dates, a start and end date. In the database there would be a start and end date.
The date check would ensure the entered start and end dates on the form do not overlap any of the start and end dates in the database.
I did notice the datecompare can be used without the precision option.
Mike
-
4. Re: Checks the complete date (mm/dd/yyyy) against another compelete date (mm/dd/yyyy)
Dan Bracuk Dec 6, 2012 9:24 AM (in response to userCold9)Looks like you are trying to use coldfusion code when sql code would be more appropriate.
If I am interpreting your post correctly, you want to do somethign like this:
select some fields
from some tables
where #coldfusion start date# not between database_start_date and database_end_date
and more stuff to complete your logic

