Jump to content

Finding by Year


hfinlay
 Share

This topic is 6434 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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".

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 6434 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.