I'm working on a client's site, and he needs coupon expiration dates to change red if they're two weeks or less to expiring. Otherwise they will be black.
The site itself was not made by me. I just started here and they want me to learn ColdFusion. So I've been stumbling through it.
I thought that maybe by using DateCompare or DateDiff I could get what I want. However I get garbled text when I <CFOUTPUT>
the results of either comparison. It displays a long string of 51515151551
that gradually gets smaller and smaller for each subsequent coupon item on the customers list.
The coupon date itself (ie end_date) is called from the Microsoft SQL database. It is formatted using Dateformat: #dateformat(end_date,"m/d/yyyy")#
.
I tried to compare it with Now()
in order to dynamically determine whether or not the expiration date should be colored red. I've also tried formatting Now()
, I get the same results.
Any seasoned programmers here that could lead me to the right path?