Free Web Site - Free Web Space and Site Hosting - Web Hosting - Internet Store and Ecommerce Solution Provider - High Speed Internet
Search the Web

Display Today's date with VB Script

Web Tips:   VB Script Tips


Codes as following:

<script LANGUAGE="VBScript">
<!--
d=weekday(date)
if d = 1 then
today="Sunday"
elseif d = 2 then
today="Monday"
elseif d = 3 then
today="Tuesday"
elseif d = 4 then
today="Wednesday"
elseif d = 5 then
today="Thursday"
elseif d = 6 then
today="Friday"
elseif d = 7 then
today="Saturday"
end if
m=month(date)
if m=1 then
mon="January"
elseif m=2 then
mon="February"
elseif m=3 then
mon="March"
elseif m=4 then
mon="April"
elseif m=5 then
mon="May"
elseif m=6 then
mon="June"
elseif m=7 then
mon="July"
elseif m=8 then
mon="August"
elseif m=9 then
mon="September"
elseif m=10 then
mon="October"
elseif m=11 then
mon="November"
elseif m=12 then
mon="December"
end if
Document.Write today & ", " & mon & " " & day(now) & ", " & year(now)
-->
</script>

   Pls test it:

Today is :


Copyright (c) 1999 - 2001, robert han, all rigths are reserved.