i have a requirement to prompt the time to the user. Like the time is 12 hours 15 mins.
what is the code to do that?
Regards & Thanks,
Amit
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
How to prompt the time in correct format
-
- Posts: 53
- Joined: Sun Feb 15, 2009 11:42 pm
- Contact:
-
- Posts: 53
- Joined: Sun Feb 15, 2009 11:42 pm
- Contact:
Re: How to prompt the time in correct format
Please help me on this.
amitkhosla wrote:i have a requirement to prompt the time to the user. Like the time is 12 hours 15 mins.
what is the code to do that?
Regards & Thanks,
Amit
IVR code to prompt the time to the user
Hi,
Here is some IVR code using the IVR tag, <say-as>, that should help you with this:
Hope this helps.
Regards,
Plum Support
Here is some IVR code using the IVR tag, <say-as>, that should help you with this:
Code: Select all
<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<form>
<script>
var mytime = new Date();
hours = mytime.getHours();
minutes = mytime.getMinutes();
</script>
<block>
<prompt>
The time now is <value expr="hours"/> hours and <value expr="minutes"/> minutes.
</prompt>
</block>
</form>
</vxml>
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com