EasyCFM.COM ColdFusion Forums / Coding Help! / one step forgot

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: one step forgot

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

125pr
04-15-2006 @ 3:44 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 68
Joined: Oct 2005

Its my same forums application where I also having problem related to the formating of date function.

I get this eror mesage when I used rereplacenocase function for formatting the date:This is the error

Argument 2 of function REReplace cannot be an empty value.

and this is the code:



<cfset newdate = rereplacenocase(Post_date, "monday", "", "all")>
<cfset newdate = rereplacenocase(newdate, "tuesday", "", "all")>
<cfset newdate = rereplacenocase(newdate, "wednesday", "", "all")>
<cfset newdate = rereplacenocase(newdate, "thursday", "", "all")>
<cfset newdate = rereplacenocase(newdate, "friday", "", "all")>
<cfset newdate = rereplacenocase(newdate, "saturday", "", "all")>
<cfset newdate = rereplacenocase(newdate, "sunday", "", "all")>

<cfset newdate = rereplacenocase(newdate, "january", "", "all")>
<cfset newdate = rereplacenocase(newdate, "feburary", "", "all")>
<cfset newdate = rereplacenocase(newdate, "march", "", "all")>
<cfset newdate = rereplacenocase(newdate, "april", "", "all")>
<cfset newdate = rereplacenocase(newdate, "may", "", "all")>
<cfset newdate = rereplacenocase(newdate, "june", "", "all")>
<cfset newdate = rereplacenocase(newdate, "july", "", "all")>
<cfset newdate = rereplacenocase(newdate, "august", "", "all")>
<cfset newdate = rereplacenocase(newdate, "september", "", "all")>
<cfset newdate = rereplacenocase(newdate, "october", "", "all")>
<cfset newdate = rereplacenocase(newdate, "november", "", "all")>
<cfset newdate = rereplacenocase(newdate, "december", "", "all")>

<cfset remove = left(newdate, "3")>
26. <cfset newdate = rereplacenocase(newdate, remove, "", "all")>
<cfset newdate = rereplacenocase(newdate, ",", "/", "all")>


line 26 is the cause I think

Gurpreet Singh Randhawa
www.randhawaz.com

mquack
04-16-2006 @ 1:51 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1544
Joined: Jan 2005

Check the reReplaceNoCase()  and reReplace() pages on LiveDocs to see the proper use of the function.

The code you've shown uses reReplaceNoCase(), but the error message that you posted references reReplace().  One of the two is incorrect.  I'm assuming that you've posted the correct error message, so that would indicate that the line of code is incorrect?

http://www.rachelqueensg.com


Website Designed and Developed by Pablo Varando.