Hi
I have a field with various fy dates listed as eg. 202301, 202302 etc... int 32 format, 202301 being apr and I want that to say Apr-23.
What would be the formula for it pls.?
Thank you
Hey @chiragpatel_1,
Sure, you can do that aswell - I just prefer to split it out to keep it better understandable.
But this formula alone will also do:
DateTimeFormat(DateTimeAdd(DateTimeParse(ToString([Date]),"%y%M"),3,'Months'),"%b")+"-"+ToString(DateTimeYear(DateTimeParse(ToString([Date]),"%y%M")))
You could do something like this (202301 is jan and not apr, right?):
Why it works this way: https://help.alteryx.com/20231/designer/datetime-functions
Hey @chiragpatel_1 similar to @FrederikE solution The date 202301 would be Jan and not April:
@chiragpatel_1 similar solution as others
Thanks all below but i rlly need it t say apr as it is a financial year format.
@chiragpatel_1,
Can you please specify how this format is built? This is certainly not a typical financial year format - I can't see the logic behind this. Why does "202301" reference to April? What would 202302 reference to then?
Ah, I see. Then you can modify the date by 3 months and it should be corrected. 202301 will be April, 202310 will then be Jan - is it expected like that?
@chiragpatel_1 this would work for your case aswell @FrederikE that's a neat approach:
can you not do it without date time tool and just via the formula?
@chiragpatel_1 I don't know if my approach was what you wanted but it's two formulas one other question do you plan on using these dates in calculations at all later on?
Brilliant, thank you so much, that is a big formula.
Very helpful. Thank you.