Hello Community:
How to convert Excel formula into Alteryx formula?
=IF(A2>0,TEXT(A2,"YYYY")&"-"&TEXT(A2,"MM"),0)
Appreciate your response.
Thanks
Solved! Go to Solution.
If you read your date field into Alteryx and it already recognizes it as a date ("YYYY-MM-DD"), you should be able to create a new string field with a formula tool with this expression:
datetimeformat([Date], "%Y-%m")
On the other hand, if you read your field into Alteryx and it still looks like "MM/DD/YYYY" then try this expression to create a string field using a formula tool:
datetimeformat(DateTimeParse([Date],"%m/%d/%Y"), "%Y-%m")
If you want more details on date/time formatting in Alteryx, see this article: https://help.alteryx.com/20213/designer/datetime-functions
Thank you.
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |