JoeP
09-08-2002, 04:14 AM
The Code at the bottom of this post is a clean little Javascript that gives me the Day/Date. (e.g the output is "Sat, Sep 7, 2002" )
I would appreciate an ASP script that would give me the same thing with available variables coming from an ASP SELECT statement.
intMonth
intDay
intYear
I am attempting to give The ACTUAL Day of The Week for my Signature Script (see Signature Below) selection "Today's Events In History" for the curDate and curYear comment for each event. (e.g. "Sat, Sep 7, 1932") where intYear = 1932.
Any tips / suggestions will be appreciated.
Thank You.
<script language = "JavaScript">
<!--
curDate = new Date();
var curDay = "";
curMonth = new Array(12);
curMonth[0] = "Jan";
curMonth[1] = "Feb";
curMonth[2] = "Mar";
curMonth[3] = "Apr";
curMonth[4] = "May";
curMonth[5] = "Jun";
curMonth[6] = "Jul";
curMonth[7] = "Aug";
curMonth[8] = "Sep";
curMonth[9] = "Oct";
curMonth[10] = "Nov";
curMonth[11] = "Dec";
if(curDate.getDay() == 1){curDay = "Mon";}
if(curDate.getDay() == 2){curDay = "Tue";}
if(curDate.getDay() == 3){curDay = "Wed";}
if(curDate.getDay() == 4){curDay = "Thu";}
if(curDate.getDay() == 5){curDay = "Fri";}
if(curDate.getDay() == 6){curDay = "Sat";}
if(curDate.getDay() == 7){curDay = "Sun";}
if(curDate.getDay() == 0){curDay = "Sun";}
var curYear = curDate.getYear();
var BrowserName = navigator.appName;
if(BrowserName == "Netscape"){var curYear = curDate.getYear() + 1900;}
document.write(curDay + ", " + curMonth[curDate.getMonth()] + " " + curDate.getDate() + ", " + curYear);
-->
</script>
I would appreciate an ASP script that would give me the same thing with available variables coming from an ASP SELECT statement.
intMonth
intDay
intYear
I am attempting to give The ACTUAL Day of The Week for my Signature Script (see Signature Below) selection "Today's Events In History" for the curDate and curYear comment for each event. (e.g. "Sat, Sep 7, 1932") where intYear = 1932.
Any tips / suggestions will be appreciated.
Thank You.
<script language = "JavaScript">
<!--
curDate = new Date();
var curDay = "";
curMonth = new Array(12);
curMonth[0] = "Jan";
curMonth[1] = "Feb";
curMonth[2] = "Mar";
curMonth[3] = "Apr";
curMonth[4] = "May";
curMonth[5] = "Jun";
curMonth[6] = "Jul";
curMonth[7] = "Aug";
curMonth[8] = "Sep";
curMonth[9] = "Oct";
curMonth[10] = "Nov";
curMonth[11] = "Dec";
if(curDate.getDay() == 1){curDay = "Mon";}
if(curDate.getDay() == 2){curDay = "Tue";}
if(curDate.getDay() == 3){curDay = "Wed";}
if(curDate.getDay() == 4){curDay = "Thu";}
if(curDate.getDay() == 5){curDay = "Fri";}
if(curDate.getDay() == 6){curDay = "Sat";}
if(curDate.getDay() == 7){curDay = "Sun";}
if(curDate.getDay() == 0){curDay = "Sun";}
var curYear = curDate.getYear();
var BrowserName = navigator.appName;
if(BrowserName == "Netscape"){var curYear = curDate.getYear() + 1900;}
document.write(curDay + ", " + curMonth[curDate.getMonth()] + " " + curDate.getDate() + ", " + curYear);
-->
</script>