Date formats in webpages

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Date formats in webpages

    I am new to using ASP and am trying to develop a site for the band I am a
    member of. The data for our bookings is held in an Access database and I can
    manipulate the date format as much as I like in Access but it doesn't make
    any difference to what appears in my webpage.

    The page is [url]http://www.bedfordtownband.org.uk/calendar.asp[/url]

    I want to get dates appearing as for example:

    Sun 10 Aug 2003.

    This is easy to achieve in Access and I have done so. However, I don't seem
    to have any control over how the date appears in the asp page. To get the
    day appearing which is important to me I have had to enter this as a field
    in its own right, not really what I want to do. The code I use to produce
    the calendar part of the page is as below:

    <table width="100%" border="2" cellpadding="5">
    <tr>
    <td width="19%"><font size="1"><b>Date</b></font></td>
    <td width="16%"><font size="1"><b>Band</b></font></td>
    <td width="19%"><font size="1"><b>Venue</b></font></td>
    <td width="16%"><font size="1"><b>Time</b></font></td>
    <td width="30%"><font size="1"><b>Notes</b></font></td>
    </tr>
    <%
    Set Catalog=Server.CreateObject("ADODB.Recordset")
    Catalog.open "SELECT * FROM qrybookings", "DSN=calendar"
    Do WHILE NOT Catalog.EOF
    Response.Write "<tr valign='top'><td><font size='1'>" & Catalog("day") & " "
    & Catalog("date") & "</font></td><td><font size='1'>" & Catalog("band") &
    "</font></td><td><font size='1'>" & Catalog("venue") &
    "</font></td><td><font size='1'>" & Catalog("time") & "</font></td><td><font
    size='1'>" & Catalog("notes") & "</font></td></tr>"

    Catalog.MoveNext
    Loop
    %>
    </table>

    I imagine there must be a way of doing this in ASP but I can't find it! If
    anyone can help with this I would be very grateful indeed.

    Geoff Wickens
    Bedford Town Band


    Geoff Wickens Guest

  2. Similar Questions and Discussions

    1. Dreamlettes Calendar Extension - Date Formats
      Hi Everyone, I've just installed the Dreamlettes Calendar extension and I'm having a few problems with date formats. I'm in the UK however, the...
    2. date formats
      hi i am working with uk date formats (dd/mm/yy) however the server the site is hosted on is in the us(mm/dd/yy) format i am using the following...
    3. SQL Server & international date formats
      Here we go again...... I have been developing an asp app using a SQL Server DB on my test server in the UK. All formats are set to be UK formats,...
    4. Handle multiple input date formats?
      I have a date input field and I want to be able to handle 3/22/04, 22-mar-04, March 22, 2004, etc. I looked through the Module List and there are...
    5. Converting Date Formats?
      Howdy! I have some dates in a MySQL database that are in a 'Y-m-d' format. Is there a way to have PHP read these dates and convert them to a...
  3. #2

    Default Re: Date formats in webpages

    You have to format the date after you retrieve it. Look up the functions
    WeekdayName() and FormatDateTime() in MSDN.

    Regards,

    Alan

    "Geoff Wickens" <gwickens@ntlworld.com> wrote in message
    news:Q2pZa.114$Ll.67372@newsfep1-win.server.ntli.net...
    > I am new to using ASP and am trying to develop a site for the band I am a
    > member of. The data for our bookings is held in an Access database and I
    can
    > manipulate the date format as much as I like in Access but it doesn't make
    > any difference to what appears in my webpage.
    >
    > The page is [url]http://www.bedfordtownband.org.uk/calendar.asp[/url]
    >
    > I want to get dates appearing as for example:
    >
    > Sun 10 Aug 2003.
    >
    > This is easy to achieve in Access and I have done so. However, I don't
    seem
    > to have any control over how the date appears in the asp page. To get the
    > day appearing which is important to me I have had to enter this as a field
    > in its own right, not really what I want to do. The code I use to produce
    > the calendar part of the page is as below:
    >
    > <table width="100%" border="2" cellpadding="5">
    > <tr>
    > <td width="19%"><font size="1"><b>Date</b></font></td>
    > <td width="16%"><font size="1"><b>Band</b></font></td>
    > <td width="19%"><font size="1"><b>Venue</b></font></td>
    > <td width="16%"><font size="1"><b>Time</b></font></td>
    > <td width="30%"><font size="1"><b>Notes</b></font></td>
    > </tr>
    > <%
    > Set Catalog=Server.CreateObject("ADODB.Recordset")
    > Catalog.open "SELECT * FROM qrybookings", "DSN=calendar"
    > Do WHILE NOT Catalog.EOF
    > Response.Write "<tr valign='top'><td><font size='1'>" & Catalog("day") & "
    "
    > & Catalog("date") & "</font></td><td><font size='1'>" & Catalog("band") &
    > "</font></td><td><font size='1'>" & Catalog("venue") &
    > "</font></td><td><font size='1'>" & Catalog("time") &
    "</font></td><td><font
    > size='1'>" & Catalog("notes") & "</font></td></tr>"
    >
    > Catalog.MoveNext
    > Loop
    > %>
    > </table>
    >
    > I imagine there must be a way of doing this in ASP but I can't find it!
    If
    > anyone can help with this I would be very grateful indeed.
    >
    > Geoff Wickens
    > Bedford Town Band
    >
    >

    Alan Guest

  4. #3

    Default Re: Date formats in webpages

    Here is a link to the MSDN library online:
    [url]http://msdn.microsoft.com/library/default.asp[/url]

    Alan


    "Alan" <SPAMMENOTalan.howard@inspire.net.nz> wrote in message
    news:OtGosryXDHA.2448@TK2MSFTNGP09.phx.gbl...
    > You have to format the date after you retrieve it. Look up the functions
    > WeekdayName() and FormatDateTime() in MSDN.
    >
    > Regards,
    >
    > Alan
    >
    > "Geoff Wickens" <gwickens@ntlworld.com> wrote in message
    > news:Q2pZa.114$Ll.67372@newsfep1-win.server.ntli.net...
    > > I am new to using ASP and am trying to develop a site for the band I am
    a
    > > member of. The data for our bookings is held in an Access database and I
    > can
    > > manipulate the date format as much as I like in Access but it doesn't
    make
    > > any difference to what appears in my webpage.
    > >
    > > The page is [url]http://www.bedfordtownband.org.uk/calendar.asp[/url]
    > >
    > > I want to get dates appearing as for example:
    > >
    > > Sun 10 Aug 2003.
    > >
    > > This is easy to achieve in Access and I have done so. However, I don't
    > seem
    > > to have any control over how the date appears in the asp page. To get
    the
    > > day appearing which is important to me I have had to enter this as a
    field
    > > in its own right, not really what I want to do. The code I use to
    produce
    > > the calendar part of the page is as below:
    > >
    > > <table width="100%" border="2" cellpadding="5">
    > > <tr>
    > > <td width="19%"><font size="1"><b>Date</b></font></td>
    > > <td width="16%"><font size="1"><b>Band</b></font></td>
    > > <td width="19%"><font size="1"><b>Venue</b></font></td>
    > > <td width="16%"><font size="1"><b>Time</b></font></td>
    > > <td width="30%"><font size="1"><b>Notes</b></font></td>
    > > </tr>
    > > <%
    > > Set Catalog=Server.CreateObject("ADODB.Recordset")
    > > Catalog.open "SELECT * FROM qrybookings", "DSN=calendar"
    > > Do WHILE NOT Catalog.EOF
    > > Response.Write "<tr valign='top'><td><font size='1'>" & Catalog("day") &
    "
    > "
    > > & Catalog("date") & "</font></td><td><font size='1'>" & Catalog("band")
    &
    > > "</font></td><td><font size='1'>" & Catalog("venue") &
    > > "</font></td><td><font size='1'>" & Catalog("time") &
    > "</font></td><td><font
    > > size='1'>" & Catalog("notes") & "</font></td></tr>"
    > >
    > > Catalog.MoveNext
    > > Loop
    > > %>
    > > </table>
    > >
    > > I imagine there must be a way of doing this in ASP but I can't find it!
    > If
    > > anyone can help with this I would be very grateful indeed.
    > >
    > > Geoff Wickens
    > > Bedford Town Band
    > >
    > >
    >
    >

    Alan Guest

  5. #4

    Default Re: Date formats in webpages

    Many thanks for the great assistance. I have now got it working!

    Geoff


    "Alan" <SPAMMENOTalan.howard@inspire.net.nz> wrote in message
    news:unx65syXDHA.2620@TK2MSFTNGP09.phx.gbl...
    > Here is a link to the MSDN library online:
    > [url]http://msdn.microsoft.com/library/default.asp[/url]
    >
    > Alan
    >
    >
    > "Alan" <SPAMMENOTalan.howard@inspire.net.nz> wrote in message
    > news:OtGosryXDHA.2448@TK2MSFTNGP09.phx.gbl...
    > > You have to format the date after you retrieve it. Look up the functions
    > > WeekdayName() and FormatDateTime() in MSDN.
    > >
    > > Regards,
    > >
    > > Alan
    > >
    > > "Geoff Wickens" <gwickens@ntlworld.com> wrote in message
    > > news:Q2pZa.114$Ll.67372@newsfep1-win.server.ntli.net...
    > > > I am new to using ASP and am trying to develop a site for the band I
    am
    > a
    > > > member of. The data for our bookings is held in an Access database and
    I
    > > can
    > > > manipulate the date format as much as I like in Access but it doesn't
    > make
    > > > any difference to what appears in my webpage.
    > > >
    > > > The page is [url]http://www.bedfordtownband.org.uk/calendar.asp[/url]
    > > >
    > > > I want to get dates appearing as for example:
    > > >
    > > > Sun 10 Aug 2003.
    > > >
    > > > This is easy to achieve in Access and I have done so. However, I don't
    > > seem
    > > > to have any control over how the date appears in the asp page. To get
    > the
    > > > day appearing which is important to me I have had to enter this as a
    > field
    > > > in its own right, not really what I want to do. The code I use to
    > produce
    > > > the calendar part of the page is as below:
    > > >
    > > > <table width="100%" border="2" cellpadding="5">
    > > > <tr>
    > > > <td width="19%"><font size="1"><b>Date</b></font></td>
    > > > <td width="16%"><font size="1"><b>Band</b></font></td>
    > > > <td width="19%"><font size="1"><b>Venue</b></font></td>
    > > > <td width="16%"><font size="1"><b>Time</b></font></td>
    > > > <td width="30%"><font size="1"><b>Notes</b></font></td>
    > > > </tr>
    > > > <%
    > > > Set Catalog=Server.CreateObject("ADODB.Recordset")
    > > > Catalog.open "SELECT * FROM qrybookings", "DSN=calendar"
    > > > Do WHILE NOT Catalog.EOF
    > > > Response.Write "<tr valign='top'><td><font size='1'>" & Catalog("day")
    &
    > "
    > > "
    > > > & Catalog("date") & "</font></td><td><font size='1'>" &
    Catalog("band")
    > &
    > > > "</font></td><td><font size='1'>" & Catalog("venue") &
    > > > "</font></td><td><font size='1'>" & Catalog("time") &
    > > "</font></td><td><font
    > > > size='1'>" & Catalog("notes") & "</font></td></tr>"
    > > >
    > > > Catalog.MoveNext
    > > > Loop
    > > > %>
    > > > </table>
    > > >
    > > > I imagine there must be a way of doing this in ASP but I can't find
    it!
    > > If
    > > > anyone can help with this I would be very grateful indeed.
    > > >
    > > > Geoff Wickens
    > > > Bedford Town Band
    > > >
    > > >
    > >
    > >
    >
    >

    Geoff Wickens Guest

Posting Permissions

  • You may not post new threads
  • You may 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