Collecting date and time through an IVR application is a common requirements and many developers have posted questions about how to write VoiceXML code that collects this information. The following IVR code example collects the day of the week and (universal) time of of day. It can be used with any VoiceXML app.
var currentDate = new Date();
var month = currentDate.getMonth() + 1;
var day = currentDate.getDate();
var year = currentDate.getFullYear();
currentDate = month + “/” + day + “/” + year;
var currentTime = new Date();
var hour = currentTime.getUTCHours();
var minute = currentTime.getUTCMinutes();
The date is <value expr=”currentDate”/>. The universal time is <value expr=”hour”/> hours and <value expr=”minute”/> minutes.
Here’s a link to reference Date objects: http://www.w3schools.com/jsref/jsref_obj_date.asp