Professional Web Applications Themes

date stuff - ASP

<% 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...

  1. #1

    Default date stuff

    <%
    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
    alexz Guest

  2. #2

    Default Re: date stuff

    You could write your own function:
    [url]http://www.aspfaq.com/2313[/url]



    "alexz" <alexz33hotmail.com> wrote in message
    news:43d72b53.0307161230.529a8b42posting.google.c om...
    > <%
    > 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

    Aaron Bertrand - MVP Guest

  3. #3

    Default Re: date stuff

    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 Doentation 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 doentation, you may wish to download the
    scripting doentation. Here it is:
    [url]http://www.microsoft.com/downloads/details.aspx?FamilyID=01592c48-207d-4be1-8a76-1c4099d7bbb9&DisplayLang=en[/url]

    HTH,
    Bob Barrows

    alexz wrote:
    > <%
    > 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

    Bob Barrows Guest

  4. #4

    Default Re: date stuff

    "alexz" <alexz33hotmail.com> wrote in message
    news:43d72b53.0307161230.529a8b42posting.google.c om...
    > <%
    > 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:
    [url]http://msdn.microsoft.com/library/en-us/script56/html/vsfctmonthname.asp[/url]
    WeekdayName:
    [url]http://msdn.microsoft.com/library/en-us/script56/html/vsfctWeekdayName.asp[/url]
    VB Format Function: [url]http://www.aspfaq.com/show.asp?id=2313[/url]


    Chris Hohmann Guest

Similar Threads

  1. JSObject returns wrong date. How can Iextract correct date from digital signature?
    By Hal_Underwood@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 0
    Last Post: February 19th, 01:22 AM
  2. Replies: 1
    Last Post: October 24th, 11:38 AM
  3. Trying to get HTML::Mason running, stuff out-of-date?
    By zzz@mailinator.com in forum PERL Modules
    Replies: 1
    Last Post: October 8th, 02:30 PM
  4. Replies: 3
    Last Post: October 21st, 07:13 PM
  5. converting date into database date format(newbie)
    By Binay Agarwal in forum PHP Development
    Replies: 2
    Last Post: August 29th, 01:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139