cancel
Showing results for 
Search instead for 
Did you mean: 

Function ToDate uses an invalid format 'yyyyMMdd' for parameter format. Try rewriting the formula.

Former Member
0 Kudos

How can I convert a date format such as "20140730" using TO_DATE()??

I have tried to create a calculated dimension with ToDate function but it seems Lumira didn't support with that specific format.

Thanks,

Raymond

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Raymond,

I understand your concern about the date format. Are you getting blank cells when using the year first, such as "yyyyMMdd"?


Try to use this formula below when creating a calculated dimension (replace {Date} with the correct dimension if different):

ToDate( {Date} ,"dd/MM/yyyy")

It should convert it to a date just fine that way, and then you can right-click on the column and change it to whatever you prefer using "Display Formatting". I'm not sure why this is happening after I did some testing, but I'm sure it will be fixed.

If you want to use Tammy's method, it's also very simple. Just right-click on the column, "Convert to Text" and set number of digits to keep to 0. Then convert to date using the first option in the drop down and change display formatting to whichever you prefer afterwards.

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for Tammy and Khuram, your's solution are really work.

TammyPowlas
Active Contributor
0 Kudos

Hi Raymond - do you need to write a function when the Prepare room can change it for you?

See below: