1

I have picklist which has date values like 01/01/2016,01/02/2016 ..... I need to Map this picklist value to One formula(date) field.

I have tried with Datevalue(TEXT(picklist_c)) in the formula field, But it didn't work. The format is correct but it is showing on the field #Error!

0

1 Answer 1

6

DATEVALUE requires the format to be "YYYY-MM-DD". Since your picklist doesn't match that format, you'd need some extensive code:

DATEVALUE(RIGHT(TEXT(picklist),4)&"-"&MID(TEXT(picklist),4,2)&"-"&LEFT(TEXT(picklist),2))

Or:

DATE(VALUE(RIGHT(TEXT(picklist),4)), 
     VALUE(MID(TEXT(picklist),4,2)), 
     VALUE(LEFT(TEXT(picklist),2)))
1
  • can you give me the exact formula? because This is not working. You are right that my format is wrong,
    – user51181
    Commented Dec 14, 2017 at 7:15

You must log in to answer this question.