June 14, 200421 yr Hi there, i have a global Year field where user enters Year to find matching records. How then do you find records that match that year, when the records Date fields are of the format 31/12/2004? When I go to do a find just using the Year, I get the error message about the date format being wrong. Wildcards don't seem to help. What am I not doing? Thanks
June 14, 200421 yr I assume, that your global year field is formatted to give the result as number. Then define a new calculation field: c_year_n = Year(YearField) and do your search in this field. The function Year(date) gives you only the year numbers of a date: i.e. "2004" of "32/12/2004".
June 14, 200421 yr Insert Calculated Result [dateField, DateToText( Date(1,1,gYear) ) & "..." & DatetoText( Date(12,31,gYear) )] would also work, assuming dateField is on the layout showing when the script runs.
Create an account or sign in to comment