Get only Month and Year from Variable

hello guys so this is extracted data from Read Cell Activity Excel

do u know how to get only Month and only Year ?


if in_str = “18/07/2019”

out_month = Split(in_str,“/”)(1).tostring
out_year = Split(in_str,“/”)(2).tostring

if we want month in wordings
out_month = Datetime.ParseExact(in_str,“dd/MM/yyyy”,system.globalization.cultureinfo.invariantculture).tostring(“MMMM”)

Cheers @Aluneth_X

1 Like

i did but there is some error

1 Like

Fine lets do one thing
before that assiign activityy use a writeline activity and mention as NomorFaktur.ToString
this will let us know the format of date
so based on that we can modify the dateformat in parseexact method
Cheers @Aluneth_X

Hello @Aluneth_X
do you want month and Year separately or combined? check the below workflow for all the outputs !!!
DateTime.xaml (6.5 KB)

thank you sir

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.