Icon

01_​Using_​Flow_​Variables_​for_​the_​Time_​Range

Using workflow variables in a Java Snippet node
A workflow demonstrating how to use workflow variables in a Java Snippet node for filtering purposes. This script parses both the variables defined on the workflow and the date fields in the input table andconverts them into java Date objects. The Date objects have convenience methods "after" and "before" toremove irrelevant entries.Note, the "SimpleDateFormat" in the global variable declaration needs to match the input fields. That is, if youhave only date but no time information in the input, you would use a format such as SimpleDateFormat dataFormat = new SimpleDateFormat("yyyy-MM-dd");If the input fields contain date and time information, you'd use this declaration: SimpleDateFormat dataFormat = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm"); create timestampsinclude timestamps between start and end Create Date&TimeRange Java SnippetRow Filter A workflow demonstrating how to use workflow variables in a Java Snippet node for filtering purposes. This script parses both the variables defined on the workflow and the date fields in the input table andconverts them into java Date objects. The Date objects have convenience methods "after" and "before" toremove irrelevant entries.Note, the "SimpleDateFormat" in the global variable declaration needs to match the input fields. That is, if youhave only date but no time information in the input, you would use a format such as SimpleDateFormat dataFormat = new SimpleDateFormat("yyyy-MM-dd");If the input fields contain date and time information, you'd use this declaration: SimpleDateFormat dataFormat = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm"); create timestampsinclude timestamps between start and end Create Date&TimeRange Java SnippetRow Filter

Nodes

Extensions

Links