SubString Method with select Item Activities

Hi Software Engineers,
I’m automating from excel data in which one of column name is Date (2021/10/12) (2022/10/14) like screenshot.I want to loop this date data from website. In this website, 2021年10月12日(each drop down pattern).So , I have to indicate three select item activities. But I created only one variable(strDate).In there, how can I substract this (2022/10/14) from excel.



Select Box
Main.xaml (27.7 KB)
Kind Regards,
Gloden

Hi,

Can you try the following steps?

First, create datetime variable from Date column as the following.

dtDate = DateTime.Parse(CurrentRow("Date").ToString)

Then, we can get each string like

dtDate.Year.ToString+"年"

dtDate.Month.ToString+"月"

dtDate.Day.ToString+"日"

Hope this helps you.

Regards,

1 Like

Dear Daffodil,

You can try out the below step to split the string to 3 to extract,day,month and year.

If the Date format in column is fixed
strDate=2020/10/14

Year part for the dropdown=strDate.Split("/")(0).ToString
Month part for the dropdown=strDate.Split("/")(1).ToString
Day/Date part for the dropdown=strDate.Split("/")(2).ToString

ForumDateDaffodil.xaml (6.5 KB)

Hope this helps.

Thanks,
Geetishree Rao

1 Like

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