VoiceGuide IVR Software Main Page
Jump to content

Datetime Format -odbc - One Digit

Recommended Posts

I use MySQL where the date and time in this format:

2006-01-27 01:33:58

 

In the Vbscript I use this connection:

Driver={MySQL ODBC 3.51 Driver …

 

When I create a varible in the VBscript and place the Date-time data from the recordset with the following statement:

dteDate = (rsPayments.Fields("PaymentDate"))

the result will be 1/27/2006 1:33:58

 

It means that if the month, day and hour are only one digit, they will not be in two-digit format. All your examples in the Say Number module help file and lib_num2wav file functions assume the two-digit format, like MM or DD but sometimes I have only M or D.

 

How can I solve this problem?

Share this post


Link to post
if the month, day and hour are only one digit, they will not be in two-digit format. All your examples in the Say Number module help file and lib_num2wav file functions assume the two-digit format, like MM or DD but sometimes I have only M or D.

 

How can I solve this problem?

check for values less then 10 and in these cases prefix a "0" to the expression containing the value before using the Say Numbers module.

 

Easiest done in a "Run VBScript" module.

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
×