Data Management: Cognos Data Manager (v8.3): ToDate Error

The ToDate function has an annoying feature whereby it will translate a DATE STRING that is NOT in the format provided AND it will get it WRONG!

e.g. it will translate ’09-09-09′ using $!MyDate := ToDate($inputString, ‘dd-mm-yyyy’) to 9-September-0009 instead of the expect ‘null’ which would normally happen for non-matching date strings.

The year 0009 (or the other possible years 0000-0099) can be detected using something like:
If ( ToInteger(!ToChar($!MyDate, ‘YYYY’))

Related Articles

QMetrix is ISO/IEC 27001 certified: Information Security Management System

QMetrix is pleased to announce we are now ISO/IEC 27001 certified, demonstrating our commitment to information and data security. Highlighted by various data breaches in recent times, cyber threats and criminal activities are on the rise. It is paramount for organisations to uphold high security standards and manage cyber-risks even before they occur in order

Stay in touch

Get the latest insights from QMetrix straight in you inbox.

Scroll to Top

This website uses cookies to ensure you get the best experience on our website. More Information

Skip to content