I have a date being read in from a SDE geodatabase. It is in M/D/YYYY. I have the user input a year. I want to test it against the year in the table and only select the years that match. Is it possible to parse out the year in the tester or do I have to add in a DateTimeConverter Transformer to change the format?
Solved
Can I parse the year from a Date field using a tester?
Best answer by andreaatsafe
Hi @chris28 ,
You should be able to use a Tester with the "contains" operator. You would have the SDE date as the left value and the attribute holding the user's input year as the right value.
I'm not sure how you have set up the user input year, if the user's input year is from a parameter and isn't tied to an attribute already in the workflow, you'll need to use the ParameterFetcher to put it into an attribute, then you can use the Tester.
Here's a sample workflow that I set up using Excel, but the idea of using the ParameterFetcher to the Tester should work for you as well:
-Andrea
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

