Micro Focus QTP (UFT) Forums
QTP changes string returned from DB to date format - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: QTP changes string returned from DB to date format (/Thread-QTP-changes-string-returned-from-DB-to-date-format)



QTP changes string returned from DB to date format - Odette - 06-01-2015

In a QTP script the first step is to get a table name from the database
If the query used in the script is executed in DataStudio it returns this value, which is correct : bill_0120150501

But when this code is executed in QTP the value assigned to the the array and variable is bill_0101/0/215

Anyone know how to prevent QTP / VBScript from doing this?

Code:
sql="select 'bill_01'||SUBSTR(bcy_next_run,1,4)||SUBSTR(bcy_next_run,6,2)||SUBSTR(bcy_next_run,9,2) current_bill_table from bcy_billing_cycle where bcy_bill_cycle = '01';"
testd = ExecuteQuery_Eppix(EppixDBUsername,EppixDBPassword,sql,EppixDBName)
current_bill_table= testd(0,0)



RE: QTP changes string returned from DB to date format - babu123 - 06-01-2015

Code:
testd = double(ExecuteQuery_Eppix(EppixDBUsername,EppixDBPassword,sql,EppixDBName))
..... try this


RE: QTP changes string returned from DB to date format - Odette - 06-02-2015

Thank you for the reply, but no, that does not work
I need to understand why QTP / VB Script is changing the data in the first place