An Azure service for ingesting, preparing, and transforming data at scale.
my apologies @arkiboys . My reading must have gotten sloppy.
try like
toString(toDate(replace("2022 PEK02",' PEK','-'),'yyyy-MM'),'yy-MMM')
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
hello,
using data flow in data factory, how is it possible to get the last two digits of this column and put month.
for example:
comp_year, Quantity
-----------------------
2022 PEK01
2022 PEK02
...
2022 PEK12
Result to be:
yymm
--------
22-jan
22-feb
...
22-dec
Thank you
An Azure service for ingesting, preparing, and transforming data at scale.
Answer accepted by question author
my apologies @arkiboys . My reading must have gotten sloppy.
try like
toString(toDate(replace("2022 PEK02",' PEK','-'),'yyyy-MM'),'yy-MMM')
Hello @arkiboys ,
Thanks for the question and using MS Q&A platform.
As I understand, you would like a pipeline expression to convert "2022 PEK02" to "22-feb".
@formatDateTime(
replace(pipeline().parameters.testdata, ' PEK', '-')
,'yy-MMM')
formatDateTime expects a form somewhat datelike. To turn "2022 PEK-2" into "2022-02" I replace the " PEK" with "-".
Then I use the format string "yy-MMM" to specify 2 digits for the year, and 3 "M" mean 3 letters for month. 2 "M" would give a number.
Please do let me if you have any queries.
Thanks
Martin
or upvote
button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how