the importance of the de function
Today I was adding some functionality to a file upload tool. It rips through a comma separated file provided by clients and then based on what is in that file, inserts data into the database.
Because of some legacy database column types and some flexibility that is needed, we could possibly put a date in a varchar field. This date must be formatted correctly, or the string to string comparison will not work.
Here is the code I was using to check for a date within a cfprocparam tag:
So, what it did, was instead of taking the value I wanted in there, it evaluated it out and it did the math of (1/1/1965) and put a huge decimal into the database. I couldn't figure it out until one of my coworkers said, you forgot the de() function! If you don't add the de() function in there you get some weird results. If you have a dynamic ColdFusion variable you want to use in an iif() you need the de() function. My solution was this:

There are no comments for this entry.
[Add Comment]