-
convert date(string) to date (date time
Dear All
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>
-
Do you want to do this in Java?
Similar Threads
-
By rtwitty in forum VB Classic
Replies: 4
Last Post: 02-24-2005, 01:12 PM
-
Replies: 0
Last Post: 08-06-2002, 11:13 AM
-
By Esmond Hart in forum .NET
Replies: 2
Last Post: 01-14-2002, 07:24 AM
-
By wang in forum Database
Replies: 1
Last Post: 05-19-2000, 05:20 PM
-
By Joe P in forum authorevents.appleman
Replies: 1
Last Post: 04-11-2000, 04:42 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks