COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Query Studio => Topic started by: reportrudy on 10 Jun 2022 11:46:58 PM

Title: Newbie seeks help with DATE change
Post by: reportrudy on 10 Jun 2022 11:46:58 PM
Thanks in advance. I am new, and have tried every formula I could find...so it is clearly user error.

I have a 20 byte string field that users are inputting date information into. People are either entering MM/DD/YYYY (which is what we want), OR are entering the date as MMDDYYYY.

I need to create a formula that uses the value of field DATE_CUST_1 when it is MM/DD/YYYY format; ELSE, I need to convert MDDYYYY into MM/DD/YYYY. That way every value in the report will show as MM/DD/YYYY.

Help!!! Please!!!
Title: Re: Newbie seeks help with DATE change
Post by: BigChris on 28 Jun 2022 02:24:46 AM
What database are you using in the backend? There's a function in SQL server isdate() which would probably help you out, but I don't know about other databases.