logo

Response

« Return to the main article

You are viewing this page out of context. To see it in the context it is intended please click here.

About This Page

Reply posted by dave on Wed 3 Dec 2003 in response to Form Validator R2.0

Re: date format (dd/mm/yyyy)

//Get the DOB
theDate = new Date()
theDay = theDate.getDate()
if (theDay<10)
{
theDay="0"+theDay
}
theMonth = theDate.getMonth()
if (theMonth<10)
{
theMonth="0"+theMonth
}
theYear = theDate.getFullYear()
dateObj = (theDay + "/" +theMonth + "/" +theYear)
var lDOB=prompt("Please enter their Date of Birth in format
DD/MM/YYYY",dateObj)