Nominal to Date

felix_wfelix_w MemberPosts:61Contributor II
edited September 2019 inHelp

Dear Rapidminer Community

我又挣扎了一些迄今名义有限公司nversions and I hope you can help me. I am extracting with an "extract macro" a date value and I am getting a nominal value. Now I want to convert this nominal value from the macro again back to a date value.

The nominal format is:

May 22, 2016

How can I convert this into date format? All I get is: "Cannot parse date" and I have tried already plenty of options.

Any help would be greatly appreciated!

Best regards

Felix

Tagged:

Best Answer

  • yyhuangyyhuang Administrator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:363RM Data Scientist
    Solution Accepted

    Hi@felix_w,

    You may have at least 2 ways to convert nominal string to a date by a customized date format.

    My example process attached here. Be careful that no quotes on the date string of the macro variable.

    date.PNG





    <宏/ >































    YY

    sgenzer felix_w

Answers

  • felix_wfelix_w MemberPosts:61Contributor II

    @:yyhuang非常感谢你μch!! Now it finally works!:D

    I still have one question though: Why does "MMM dd, yyyy" work for a date like this: "May 22, 2016"? I don't understand why those 3 "MMM" work, I thought for a month I would always write a double M ("MM").. which was also my mistake because I tried many variances of "MM dd,yyyy and nothing worked.

    Felix

  • yyhuangyyhuang Administrator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:363RM Data Scientist

    Hi@felix_w,

    Hope these links could help you understand better about the date formats.

    https://help.gooddata.com/cloudconnect/manual/date-and-time-format.html

    https://www.vsni.co.uk/software/genstat/htmlhelp/spread/DateFormats.htm

    Inside rapidminer, you can also have a quick reference list from "nominal to date" operator.

    Some standard date formats are listed there

    date.PNG

    Cheers,

    YY

    sgenzer felix_w
  • felix_wfelix_w MemberPosts:61Contributor II

    That's really helpful! Now I get, it's simply because my date (May) has 3 letters, that is why I need three M's (MMM), right?! Would have been quite streight forward..

    sgenzer yyhuang
Sign InorRegisterto comment.