Trimming sql data to validate against

Ask general questions here.
andy.simpson
Posts: 3
Joined: Fri Jun 22, 2018 8:59 am

Trimming sql data to validate against

Post by andy.simpson » Mon Dec 17, 2018 12:57 pm

Hi,

I have an issue where I'm validating date information in our web flow form data in our SQL tables, the date in the web flow is a standard format eg. 13/12/2018 however the SQL data driven information format includes the time so 13/12/18 14:46:16 so causes the test to fail. Normally id just do attribute contains but its the wrong way around so still fails, how do I get around this? would i be able to trim the value using regex? If so how do I do this with data driven information?

Thanks

User avatar
RobinHood42
Posts: 265
Joined: Fri Jan 09, 2015 3:24 pm

Re: Trimming sql data to validate against

Post by RobinHood42 » Wed Dec 19, 2018 12:43 pm

Hi,

I assume that you're retrieving your data from an Ranorex SQL data connector/source, which is bound to a variable. You'll now have to create a CodeModule to retrieve the actual date information from your web form. This value needs to be compared to a parsed/normalized form of the value of the variable.

I hope this helps.

Cheers,
Robin