please,help me i want to convert date(string) to date (date time), this date i make setting for day with one (constant)
to use it in database i write in html
<html>
<head>
<SCRIPT type="text/javascript">
function startDate()
{
var d=new Date()
var y=d.getYear()
var m=d.getMonth()+1
var day=1
var date=m+"/"+day+"/"+y
document.write("date is: "+date)
// OUTPUT WILL BE 4/1/2007 THIS IS STRING I NEEED IT DATETIME //
var dat=Date.parse(date);
document.write("date is: "+dat)
// OUTPUT WILL BE 1175378400000 //
// PLEASE HELP ME TO GET TRUE RESULT //
}
</SCRIPT>
</head>
<body onload="startDate()" >
</body>
</html>
Mohandsa 0 Newbie Poster
rgtaylor -2 Junior Poster in Training
vikki.v 0 Newbie Poster
ehassen 0 Newbie Poster
desigeek commented: thnkx bro +0
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.