In the same vein - watch out for datediffs where the value is too big.
CF will "roll over" the value if it goes over the maximum size of
numbers in CF. This confused the heck out of me when I was building
Death Clock (years and years and years ago).


On Wed, 2 Feb 2005 15:42:03 -0500, Michael Dinowitz
<[EMAIL PROTECTED]> wrote:
> Just a small tip. When doing a datediff in CF, make sure both values are
> actually dates. I just ran a datediff where the second value (the first
> date) came from a DB. The value was actually a blank and CFMX threw a
> variable does not exist null error. This was not expected as the variables
> all existed and the only difference was that the date value was not a date.
> 
> <CFIF datediff('d', qLastOrdered.lastdate, now()) LT 180>
> 
> I solved this by adding a simple test to make sure that the value was a
> date:
> <CFIF Not IsDate(qLastOrdered.lastdate) OR datediff('d',
> qLastOrdered.lastdate, now()) LT 180>
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192805
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to