Latest Inquiries - Data Extraction Software

Adding time and date for each row in a sql database!

Submitted: 8/31/2017
Hi

I have alot of rows that are being extracted fine. The thing is the website doesnt have any time nor date.

Im after a way to extract the time and date (from my pc) via a script and write that for each row of data. The reason for this is to complile alot of data over a time frame into a neat line  graph in excel. I am truly out of my depth here. Is there and example where you can add a script that can add date and time to a sql database?


using System;
using mshtml;
using VisualWebRipper;
public class Script
{
    //See help for a definition of WrContentScriptArguments.
    public static void ScriptMethod(WrContentScriptArguments args)
    {
        try
        {
            DateTime saveNow = DateTime.Now;
            Console.WriteLine(saveNow);
        }
        catch(Exception exp)
        {
            args.WriteDebug("Custom script error: " + exp.Message);
        }
    }
}

I just dont know how to write that to a column ive created called timedate.

I've added to capture elements Timedate script option.

An example would help for all sorts of data in the future.
Thanks


Replied: 8/31/2017 6:48:37 PM
Nah the getdate alters the table but then it fails on schedule. 0x3 error and 0x1.

So any better advice would be welcomed
Replied: 8/31/2017 5:44:36 PM
I used a (getdate()) value in a column. Does the same thing in excel. as a workaround. A script that can insert any data would be pretty handy example for everyone!

thanks
Replied: 9/1/2017 6:30:49 AM
Perfect. Thanks!
Replied: 9/1/2017 1:46:32 AM

Hi,

You can actually add a FixedValue capture on your agent and use C# to generate the current time. See attached.  

Sequentum1.rip
Capture.JPG