If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Trying to get the length of a date field

Started by cognosdelaware, 20 Oct 2017 01:16:10 PM

Previous topic - Next topic

cognosdelaware

I have a date field and I need to check if it is 5 characters and if so format it as YYYYYMMDD

Some of the dates are stored as 5 characters(i.e. 70201 (represents 20070201)) or 6 characters(i.e. 150201(represents 20150201)

How can I convert the date so I can check the length of it for 5 characters?

Thanks

BigChris

Are those the only two formats? And are they stored as strings or numbers? If it's stored as a number then I think you just need to add 2000000000, but the better solution would be to stored them as actual dates in your datawarehouse - you should be able to convert them in your ETL process on the way in.

Have people forgotten the millennium bug already...?