date stuff

A

alexz

<%
dyear = year(RS("dates"))
dmonth = Month(RS("dates"))
dDay = day(RS("dates"))

response.write dyear
response.write dmonth
response.write dDay
%>

i get 2003 12 9

how do i dispaly 2003 December Tuesday
 
B

Bob Barrows

Well, I didn't know the answer off the top of my head, so I went to my msdn
library and looked up the vbscript functions. Recognizing that you may not
be an msdn subscriber, or that you may not have online help installed, I
went to msdn.microsoft.com/library, expanded the Web Development node in the
table of contents frame, scrolled down to and expanded the Scripting node,
expanded the Documentation node, expanded Windows Script Technologies node,
expanded the VBScript node, expanded Reference, and clicked on the Functions
node. Looking through the function names listed on the page, I see there is
a MonthName function, and, sure enough, a WeekdayName function, both of
which should do what you want.

Instead of the web-based documentation, you may wish to download the
scripting documentation. Here it is:
http://www.microsoft.com/downloads/...48-207d-4be1-8a76-1c4099d7bbb9&DisplayLang=en

HTH,
Bob Barrows
 
C

Chris Hohmann

alexz said:
<%
dyear = year(RS("dates"))
dmonth = Month(RS("dates"))
dDay = day(RS("dates"))

response.write dyear
response.write dmonth
response.write dDay
%>

i get 2003 12 9

how do i dispaly 2003 December Tuesday

MonthName, WeekdayName or use the VB Format function. Related links
below

MonthName:
http://msdn.microsoft.com/library/en-us/script56/html/vsfctmonthname.asp
WeekdayName:
http://msdn.microsoft.com/library/en-us/script56/html/vsfctWeekdayName.asp
VB Format Function: http://www.aspfaq.com/show.asp?id=2313
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top