Page 1 of 1

how to use say-as tag to prompt like December 25 2009

Posted: Mon Mar 30, 2009 4:46 am
by amitkhosla
Hi I have to prompt the user the date entered by him in yyyymmdd format as date using say-as tag.

if suppose use entered 20091225. i need to prompt the user saying december 25 2009.

I'm writing this, but it says 2 million 91 thousand two hundred twenty five.
<form id="reschedule_call_date_select_frm">
<block>
<prompt bargein="false">
you entered <say-as type="date:mdy">20091225</say-as>
</prompt>
</block>
</form>

Regards

IVR code to say-as tag to prompt date

Posted: Mon Mar 30, 2009 9:24 am
by support
Hi,

Here is an example of IVR code using IVR tag, <say-as>, that should help you accomplish this:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<var name="dobset" />

<form id="prompt_dob">
    <field name="dob" type="digits?length=8">
     <prompt><voice name="crystal">
        <break size="medium" />Please Enter your four digit year of birth followed by your two digit month of birth followed by your two digit day of birth
      </voice></prompt>     

    <filled>
     <assign name="dobset" expr="dob.substr(4,2)+'/'+dob.substr(6,2)+'/'+dob.substr(0,4)"/>
     <goto next="#confirm_dob" />
      </filled>
    </field>
</form>

<form id="confirm_dob">
    <block>
     <prompt><voice name="crystal">
        <break size="medium" />The Date of Birth you entered is <break size="medium" />
         <say-as type="date"><value expr="dobset" /></say-as>
      </voice></prompt>     
    </block>
</form>
</vxml>
Hope this helps.

Regards,
Plum Support