Hi @rclarkenz, I think that it's a quick way to use the Tester (Contains Regex operator) to determine if the attribute value has just four characters. There should be several ways other than that.
Right Value (regular expression that matches a string consisting of just four characters)
^....$
Hi @rclarkenz, I think that it's a quick way to use the Tester (Contains Regex operator) to determine if the attribute value has just four characters. There should be several ways other than that.
Right Value (regular expression that matches a string consisting of just four characters)
^....$
Thanks @takashi. I ended up also checking the length of the string in a Tester. If the string was 5 or less, then it mustn't be a correctly formatted date.
To genuinely check if a date is valid, i.e. to reject a date such as 31/02/2017 requires some python.
Probably not required for you if the requirement is only to identify cases with only a year value populated.
To genuinely check if a date is valid, i.e. to reject a date such as 31/02/2017 requires some python.
Probably not required for you if the requirement is only to identify cases with only a year value populated.
Hi @egomm, in FME 2017.0+, Python scripting is not essential.
Tips:
In FME 2017.0+, the @DateTimeParse function can be used to determine if a date/time value is valid or not.
@DateTimeParse(28/02/2017,%d/%m/%Y) returns "20170228"
@DateTimeParse(31/02/2017,%d/%m/%Y) returns <null>
@DateTimeParse(31/02/2017,%d/%m/%Y,repair) returns "20170303"
In FME 2017.1+, the DateTimeConverter can also be used to filter features based on the date/time validation result. That is, the transformer rejects the input feature if a specified date/time attribute value is invalid, by default (Repair Overflow: No).
Hi @egomm, in FME 2017.0+, Python scripting is not essential.
Tips:
In FME 2017.0+, the @DateTimeParse function can be used to determine if a date/time value is valid or not.
@DateTimeParse(28/02/2017,%d/%m/%Y) returns "20170228"
@DateTimeParse(31/02/2017,%d/%m/%Y) returns <null>
@DateTimeParse(31/02/2017,%d/%m/%Y,repair) returns "20170303"
In FME 2017.1+, the DateTimeConverter can also be used to filter features based on the date/time validation result. That is, the transformer rejects the input feature if a specified date/time attribute value is invalid, by default (Repair Overflow: No).
I will look forward to using that functionality, probably sometime mid 2018 :-)