Hello Everyone,
I'm having a real strange issue with pro, Pro doesn't let me save an attribute rule with correct sql syntax in a filter statement,
// Only can save the attribute rule using the dates in this format
var d_start_date = Date(this_year,03,16,07,0,0,0)
var d_end_date = Date(this_year,08,30,30,59,59,999)
// instead of correct sql filter syntax for filter below
var d_start_date_sql = Text(Date(this_year,03,16,07,0,0,0))
var d_end_date_sql = Text(Date(this_year,08,30,30,59,59,999))
var filter_statement = 'guid = <a href="https://community.esri.com/t5/user/viewprofilepage/user-id/58275">@CB</a>_gid AND cleaning_now_or_later = @clean_now AND inspection_date >= @d_start_date_sql AND inspection_date <= @d_end_date_sql'
// however, for the statement below using these variable is fine, and can save no issue
var year_beginning_date = Text(Date(this_year,00,02,-16,00,00,00))
var year_end_date = Text(Date(this_year,11,31,31,59,59,999))
var filter_statement = 'guid = <a href="https://community.esri.com/t5/user/viewprofilepage/user-id/58275">@CB</a>_gid AND cleaning_now_or_later = @clean_now AND inspection_date > @year_beginning_date AND inspection_date < @year_end_date'
This is the error I get in pro when trying to save with the sql syntax

And when I test the attribute rule from registered feature service, I get this error in the server logs when the incorrect sql syntax is used, so I know its those incorrect variables

I would love to get your input Hussein Nasser, Xander Bakker or Aaron Pulver! But it looks like I cant tag you unless you've replied.