Skip to main content
Inspiring
October 31, 2008
Question

dateformat expire problem

  • October 31, 2008
  • 2 replies
  • 366 views
here is the code i have but if i take this out of the page it works fine... for some reason it does not like the +90... where am i going wrong?



please help




This topic has been closed for replies.

2 replies

Inspiring
October 31, 2008
dateformat returns a string. if Passwordexpire.datecreated is a date object, you have a logic problem in that you are attempting to compare a date to a string.

If PasswordExpire.datecreated is a string, you have chosen a dateformat that will likely give you undesired results.
October 31, 2008
I assume you are trying to add 90 days to that date? If you are, try this:

dateFormat("10/07/2008"+90,"mm/dd/yyyy") Basically, add the double quotes around the date.

I would suggest though that you use the dateAdd() function to do this. Something like:

dateAdd("d",90,"10/07/2008")

Hope this helps!