brihol44
asked on
How do I use yyyy-mm-dd format in javascript?
I'm a beginner at javascript. I need to figure out how to convert my date to be yyyy-mm-dd format and not the "dateformat" "yyyy/mm/dd" i'm getting now. "+DayOfMonth+" which = mm/dd/yyyy
Thanks,
B
Thanks,
B
<script language="JavaScript">
<!--
// function to populate the date on the form and to close this window. --->
function ShowDate(DayOfMonth) {
var FormName="<cfoutput>#URL.FormName#</cfoutput>";
var FieldName="<cfoutput>#URL.FieldName#</cfoutput>";
eval("self.opener.document." + FormName + "." + FieldName + ".value='"+DayOfMonth+"'");
window.close();
}
//-->
</script>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.