VoiceGuide IVR Software Main Page
Jump to content

Compare Date Different From Database

Recommended Posts

Hi all,

 

I use the DateDiff VbFunction in Evalute Expression Module but always return true, can anyone can help me to solve this problem?

 

'' Let said the record in database of [Get SM Record_2_1] is 1/1/2005, and it's stored in a Data/Time Data Type in access.

 

Here is Expression,

 

DateDiff("d", CDate($RV[Get SM Record_2_1]), Date) > 0

 

And Here is the Log

 

133841.91 0 [Check SM Card Expiry Date] Evaluate [DateDiff("d", CDate($RV[Get SM Card Record_2_1]), Date) > 0]

133841.91 0 rv replace start: [DateDiff("d", CDate($RV[Get SM Card Record_2_1]), Date) > 0]

................

133841.91 0 rv replace end: [DateDiff("d", CDate(1/1/2005), Date) > 0]

133841.91 0 .Eval(DateDiff("d", CDate(1/1/2005), Date) > 0)

133841.91 0 AddRVns [Check SM Card Expiry Date_Input]{DateDiff("d", CDate(1/1/2005), Date) > 0}

133841.91 0 AddRVns [Check SM Card Expiry Date]{True}

133841.92 0 Eval Expr result:[True]

Share this post


Link to post

The CDate function expects a string input.

 

Your expression should be:

 

DateDiff("d", CDate("$RV[Get SM Record_2_1]"), Date) > 0

 

notice the quotes around the RV...

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
×