VoiceGuide IVR Software Main Page
Jump to content

Adding Days To A Date Field

Recommended Posts

After I query a database and get a field that is a date field, I need to add 14 days to it. Not sure how to do this. I'm guessing in an evaluate expression, but I'm having no luck.

Share this post


Link to post

Could you please post VoiceGuide's vgEngine trace that captures the database query.

 

We can then see in what format the date is returned and can then advise on how 14 days can be added to it.

Share this post


Link to post

Here is the log file. The result var I'm trying to assign is dateplus14. You will see this on or about line 093059.897. you can see the way I tried didn't work.

 

Thanks

 

 

Share this post


Link to post

Still nothing attached...

 

Can you try .ZIPing up the file and attaching the .ZIP version ?

Share this post


Link to post

Trace shows that query:

 

SELECT check, amount,idate,issued FROM Check WHERE check.check=123

 

results in following RVs being set for idate value retrieved:

141155.387 4 5 3 rv add SQLCheck2_idate|12/21/2016 12:00:00 AM
141155.387 4 5 3 rv add SQLCheck2_3|12/21/2016 12:00:00 AM
141155.388 4 5 3 rv add SQLCheck2_idate_1|12/21/2016 12:00:00 AM
141155.388 4 5 3 rv add SQLCheck2_3_1|12/21/2016 12:00:00 AM

$RV[sqlCheck2_3_1]stores the string "12/21/2016 12:00:00 AM" - to which 14 days need to be added.

 

Suggest looking at the VBScript function DateAdd:

 

http://www.w3schools.com/asp/func_dateadd.asp

 

please try using a "Run VBScript" module to run the below VBScript and post traces capturing the call.

 

set vg = CreateObject("vgServices.CommandLink")

sNewDate = DateAdd("d",14,"$RV[sqlCheck2_3_1]")

vg.Run_ResultReturn $RV_LINEID, "[NewDate]{" & sNewDate & "}"
set vg = Nothing

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×