Link to home
Start Free TrialLog in
Avatar of debbieau1
debbieau1Flag for United States of America

asked on

Convert string to iso date format

I have this format 30/11/2013   (dd/mm/yyyy) and need to convert ISO date format using javascript.
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try this.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Untitled</title>
</head>
<body>
<script type="text/javascript">
<!--
var str = "30/11/2013";
var res = str.split("/");
document.write(res[2]+"-"+res[1]+res[0]+"<br>");
document.write(res);
// -->
</script>

</body>
</html>

Open in new window