Closed ericaVoss closed 2 years ago
@schuemie - I was thinking about it, is there a way I would have known this wouldn’t work? I think ‘9/9/1999’ is MS SQL Server friendly but then SqlRender isn’t catching it to cast, and not sure how something like that could even be caught. In this case is the developer just responsible for knowing this?
Per the SqlRender documentation, you should avoid implicit casts.
Also, in general '9/9/1999' is a somewhat ambiguous format (although in this case it doesn't matter you Americans like to use the wrong order of days and months. ;-) ) Better to always use 'YYYY-MM-DD'. that last bit isn't documented anywhere. Using DATEFROMPARTS()
would be completely unambiguous.
Found some non-SqlRender Compliant code
This has been addressed in prior versions of this package: https://github.com/ohdsi-studies/Covid19VaccineAesiIncidenceCharacterization/issues/11 solution involved using DATEFROMPARTS