DataExtraction from web

hi Everyone,

i have problem here and i don’t know where, i wanna extract all data from website that uploaded in specific date Could please help me ?

could someone*

Hello @Z_AL

As unterstood, you want to compare the dates extracted by todays date, if it’s equal you add the date extracted to an excel file.

The thing is inside you for each row, you have to use for example row(0).ToString = date.now

Because, you have to iterate through your datatable and get each row checked…

Hope this helps!

1 Like

Thank you but (disallows implicit conversions from ‘String’ to ‘date’ ) :frowning:

1 Like

@Z_AL

I see, what’s the type and format of the dates you extract ? And why exactly you want to do it this way, i mean you want just to check if dates are equal if so write it on a excel file ?

1 Like

I want to extract some data from website and to avoid the repetition issue i will put the date condition … that’s why

1 Like

The value on the left is string,but the value on the right is a date.

You should be casting the date on the string to the right with the right format string.

row(0).ToString = date.now.toString(dateformat)

Here’s a resource that can help.

2 Likes

@AndyMenon

Yes, i didn’t notice it at first, just later… Thanks

2 Likes

Sorry @mz3bel, I thought I was responding to @Z_AL.

2 Likes

thank but still i can’t extract data from the web and i don’t know why

@Z_AL

What’s the exact format of your extracted dates ? months, days… also “MM” = month and “mm” = minutes…

1 Like

it’s 2020/05/10 , and i think i have problem in extract structured data activity … idk Still not working

@Z_AL

2020 = Year
05 = month or day ?
10 = month or day ?

row(0).ToString = date.now.ToString(“yyyy/MM/dd”) Change “MM” and “dd” as the same as the input…

1 Like

Did you check ExtractData.Rows.Count? Is there any data in the ExtractData?

Second, if your data extract is dependent on a certain date,can you check to see if the table you are extracting data from has a date component in it? If the selector that generates the ExtractData structure has an element that varies with your input, the selector for ExtractData may not be working right.

1 Like

05 month
10 day

@Z_AL

So try this :

row(0).ToString = date.now.ToString(“yyyy/MM/dd”)

how can i check ExtractData.Rows.Count?
Where can I write it
and yes it has date component

i have used the data scarping activity to extract the data

You can use a Write Line before the For Each Row activity? Something like:

"The row count is: "+ ExtractData.Rows.Count.tostring()

1 Like

@Z_AL

So this works, i just checked…

row(0).ToString = date.now.ToString(“yyyy/MM/dd”)

But, i guess, you need to know on which row exactly there’s the date… row(0) or row(1)… I think this is the issue !

1 Like

in all the rows :frowning: i think thee issue in my if function … maybe