Find() function matching date values

Find() function matching date values

I am trying to use the find function using three char expressions and one date expression. I am using PB 6.5 with Oracle as the database. The following is my command string:

ll_RuleRow = dw_rule_modifiers.Find("modifier_code  = '" + ls_modifier +"'"+ & "AND state_abbr = '" + ls_state +"'"+ & " AND coverage_type = '" + ls_cov +"'"+ & " AND String(effective_date) = " + & " String(To_Date( '" + ls_Effective_Date + "',   'MM/DD/YYYY HH24:MI:SS'))", +& 1, dw_rule_modifiers.RowCount())

I am having trouble getting the effective_date to work with the function. If I take the lines for the effective_date out, the function works. However, I need the effective_date to be in the function.

The problem you are having is that you are using an Oracle function in your Powerscript. You need to use only PowerScript functions in the find command. Replace the Data portion of the code like:

" AND String( effective_date, 'YYYY/MM/DD' ) = '" + String( ld_Effective_date, 'YYYY/MM/DD' )  + "'"

This should now work.

See also  5 Strategies for Supercharging Your CRM

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist