hi community
need help with this issue where i try to get the publication date of news website and i dont where to fix it anymore.
this is my workflow
assign : System.Text.RegularExpressions.Regex.Match(DateWEbsite, “(?<=, ).+ \d{4}”).ToString().Trim()
if condition: CDate(in_TransactionItem(“Date”).ToString).Date = DateTime.Parse(DateWebsite, New System.Globalization.CultureInfo(“my-MY”)).Date
i tried to match it with the one in the excel file. the format is like this
Yoichi
(Yoichi)
August 27, 2024, 1:54am
2
Hi,
Can you share content of DateWebsite?
Regards,
hi sorry do you want the website content?
Yoichi
(Yoichi)
August 27, 2024, 2:08am
4
Nope, can you share content of DateWebsite variable?
Yoichi
(Yoichi)
August 27, 2024, 2:11am
6
HI,
Can you try to set Breakpoint at the IF activity and Debug run? Workflow will stop there, then check Locals panel?
Regards,
sorry do you mean this one?
Yoichi
(Yoichi)
August 27, 2024, 2:15am
9
Hi,
According the above image, DateWebsite variable is empty. So it’s necessary to review settings of GetText activity and/or regex pattern.
Regards,
hi this is my current setting for get text activity
and this is the regex pattern: System.Text.RegularExpressions.Regex.Match(DateWEbsite, “(?<=, )\w+ \d{1,2}, \d{4} @ \d{1,2}:\d{2}[ap]m”).ToString().Trim()
Yoichi
(Yoichi)
August 27, 2024, 2:43am
11
Hi,
First, can you check output of GetText activity? Is it empty? If so it’s necessary to review selector settings. From the above image, it seems necessary to remove aaname attribute because it’s dynamic.
Regards,
hi i try remove the aaname but i still got the error If: String was not recognized as a valid DateTime. i also check the get text output but it return null
Yoichi
(Yoichi)
August 27, 2024, 3:28am
13
It’s necessary to modify selector settings of GetText. It may be also good to add anchor.
Regards,
@Iman_Shafeeq ,
It’s clearly an issue of Get Text Selector. Fix the selectors and you should be fine.
Thanks,
Ashok
system
(system)
Closed
August 30, 2024, 4:54am
15
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.