Which SDTM variable contained this value and how is it's datatype defined in the OpenCDISC config.xml file ?
Hi Brian,
I cannot reproduce your issue. When using your value "2012-10-10T12:--", the validator generates the expected SD0003 Error message.
Could you provide more details about your process?
As Mike suggested, it could be a case when you use define.xml file, where a data type for your variable is not "datetime". However it might happened only in v1.2.
What is a variable name you validated?
Thank you,
Sergiy
Yes, I confirm your finding now. It does not catch a value with a single trailing dash character.
Thank you!
We will check what's wrong.
Kind Regards,
Sergiy
Good to hear. When in doubt, copy and paste the regular expression into your favorite site or expression engine and test the value. I used this for simplicity.
http://www.nvcc.edu/home/drodgers/ceu/resources/test_regexp.asp
Regular Expression:
^(-|[0-9]{4})(-(-|0[0-9]|1[0-2])(-(-|[0-2][0-9]|3[0-1])(T(-|[0-1][0-9]|2[0-4])(:(-|[0-5][0-9])(:[0-5][0-9])?)?)?)?)?(/(-|[0-9]{4})(-(-|0[0-9]|1[0-2])(-(-|[0-2][0-9]|3[0-1])(T(-|[0-1][0-9]|2[0-4])(:(-|[0-5][0-9])(:[0-5][0-9])?)?)?)?)?)?$
Test String
2012-10-10T12:- pass
2012-10-10T12:-- fail
Funny i did the same. The config yields
val:Regex ID="SD0003" Variable="%Variables[*DTC]%" Test="%Variable.Type.Regex%"
Whereas other types of Regex rules actually contain the literal regular expression in the config.
The regular expression for DateTime can be found in the actual code, which is opensource and available at http://svn.opencdisc.org/. You can probably just do a search for XmlConfigurationParser.java and look in there.
^(-|[0-9]{4})(-(-|0[0-9]|1[0-2])(-(-|[0-2][0-9]|3[0-1])(T(-|[0-1][0-9]|2[0-4])(:(-|[0-5][0-9])(:[0-5][0-9])?)?)?)?)?(/(-|[0-9]{4})(-(-|0[0-9]|1[0-2])(-(-|[0-2][0-9]|3[0-1])(T(-|[0-1][0-9]|2[0-4])(:(-|[0-5][0-9])(:[0-5][0-9])?)?)?)?)?)?(?<!\-)$
I added simple condition "and not ending with hyphen character". It looks like current Regex expression can handle our case as well. However we need to make more detailed testing.
Sergiy
I think these strings also return wrong results:
2013-00-00
2013-12-00
2013-01-01T24:59:59
- (note: just a single dash, just like you mentioned as it ends with a dash)
2013-- (note: just like you mentioned as it ends with a dash)
BTW, does it support the P durations, such as YYYY-MM-DDThh:mm:ss/PnYnMnDTnHnMnS and PnYnMnDTnHnMnS/YYYY-MM-DDThh:mm:ss?
There is a separate SD1011 check for durations.
Hi Anthony,
Actually your examples are correct ISO 8601 format, but invalid date values.
It may be a separate check for invalid date. E.g.,"2012-00-00" or "2010-02-29".