Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to insert current date and time into query result in vb

Status
Not open for further replies.

kdjonesmtb2

Technical User
Nov 19, 2012
93
US
Hello,

How could I insert a vbscript date and time into the following query results set?

dim qdate
dim qtime

qdate = Date
qtime = Time

set rs602 = connB.execute(replace(" select test_case='$TESTCASE$', * from #cpt_variance ","$TESTCASE$",trim(datatable("Test_Case_Number", dtGlobalSheet))))

Thanks
 
Hello

I would like to have it after the *

I was not sure of the correct syntax on the replace statement

set rs602 = connB.execute(replace(" select test_case='$TESTCASE$', *[highlight #FCE94F]qdate, qtime[/highlight] from #cpt_variance ","$TESTCASE$",trim(datatable("Test_Case_Number", dtGlobalSheet))))

 
Is this what you want?

set rs602 = connB.execute(replace(" select test_case='$TESTCASE$', *[highlight #FCE94F], Date(), Time()[/highlight] from #cpt_variance ","$TESTCASE$",trim(datatable("Test_Case_Number", dtGlobalSheet))))
 
Yes that is what I was looking for

This query is populating a spreadsheet on shared drive


Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top