<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 5.50.4934.1600" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=789382202-03012004><FONT face=Arial color=#0000ff
size=2>web.torres.ws./dev/javascript</FONT></SPAN></DIV>
<DIV><SPAN class=789382202-03012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=789382202-03012004><FONT face=Arial color=#0000ff size=2>I have
a pretty complete DATE Class Object there.</FONT></SPAN></DIV>
<DIV><SPAN class=789382202-03012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=789382202-03012004><FONT face=Arial color=#0000ff size=2>Take
it, play with it. See if it helps.</FONT></SPAN></DIV>
<DIV><SPAN class=789382202-03012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=789382202-03012004><FONT face=Arial color=#0000ff
size=2>Walter</FONT></SPAN></DIV>
<DIV><SPAN class=789382202-03012004></SPAN> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
javascript-bounces@LaTech.edu [mailto:javascript-bounces@LaTech.edu]<B>On
Behalf Of </B>Dave Stoltz<BR><B>Sent:</B> Friday, January 02, 2004 1:13
PM<BR><B>To:</B> '[JavaScript List]'<BR><B>Subject:</B> [Javascript] ARGH!
Help with Dates!<BR><BR></FONT></DIV>
<DIV><SPAN class=592390519-02012004><FONT face=Arial size=2>I am trying
desperately to get the date in Javascript in EXACTLY this format: 1/4/2004
5:45 PM </FONT></SPAN></DIV>
<DIV><SPAN class=592390519-02012004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=592390519-02012004><FONT face=Arial size=2>This seems
painfully difficult....I have the following 2 functions working, except the
month comes back as 0 all the time.</FONT></SPAN></DIV>
<DIV><SPAN class=592390519-02012004><FONT face=Arial size=2>If the dropdown
box called "Priority" is "Normal", I want to add 2 days to the current
date/time, and if Priority is "Emergency" I want to add 1 day to the current
date/time.</FONT></SPAN></DIV>
<DIV><SPAN class=592390519-02012004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=592390519-02012004><FONT face=Arial size=2>Here are my
functions, why is the month coming back as 0 !!!!???</FONT></SPAN></DIV>
<DIV><SPAN class=592390519-02012004><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=592390519-02012004><FONT face=Arial size=2>Thanks for any
help!</FONT></SPAN></DIV>
<DIV><SPAN class=592390519-02012004></SPAN><SPAN
class=592390519-02012004><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=592390519-02012004><FONT face=Arial size=2><script
language="javascript"><BR><!--<BR>function addDays(myDate,days)
{<BR> cDate = new Date(myDate.getTime() +
days*24*60*60*1000);<BR> dy =
cDate.getDate();<BR> mn =
cDate.getMonth();<BR> y =
cDate.getYear();<BR> h =
cDate.getHours();<BR> m =
cDate.getMinutes();<BR> s =
cDate.getSeconds();<BR> nDate = mn + "/" + dy + "/" +
y + " " + h + ":" + m + ":" + s;<BR> return
nDate;<BR>}<BR>function setdueby(){<BR> var1 =
form1.Priority.value;<BR>
if(var1=='Normal'){<BR> var2 = (addDays(new
Date(),2));<BR>
form1.dueby.value=var2;<BR>
}<BR>
if(var1=='Emergency'){<BR> var3 = (addDays(new
Date(),1));<BR>
form1.dueby.value=var3;<BR> }}<BR>--><BR></script></FONT></SPAN></DIV></BLOCKQUOTE></BODY></HTML>