Ask a Question related to ASP, Design and Development.
-
Geoff Wickens #1
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
-
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... -
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... -
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,... -
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... -
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... -
Alan #2
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...can> 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 Iseem> 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"> 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") & ""</font></td><td><font> & 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") &If> 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!> anyone can help with this I would be very grateful indeed.
>
> Geoff Wickens
> Bedford Town Band
>
>
Alan Guest
-
Alan #3
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...a> 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 ammake> can> > member of. The data for our bookings is held in an Access database and I> > manipulate the date format as much as I like in Access but it doesn'tthe> seem> > 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> > to have any control over how the date appears in the asp page. To getfield> > day appearing which is important to me I have had to enter this as aproduce> > in its own right, not really what I want to do. The code I use to"> > 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> > "</font></td><td><font size='1'>" & Catalog("venue") &
> > "</font></td><td><font size='1'>" & Catalog("time") &> If> > 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!>> > anyone can help with this I would be very grateful indeed.
> >
> > Geoff Wickens
> > Bedford Town Band
> >
> >
>
Alan Guest
-
Geoff Wickens #4
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...am> 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 II> a> > > member of. The data for our bookings is held in an Access database and&> make> > can> > > manipulate the date format as much as I like in Access but it doesn't> the> > seem> > > 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> > > to have any control over how the date appears in the asp page. To get> field> > > day appearing which is important to me I have had to enter this as a> produce> > > in its own right, not really what I want to do. The code I use to> > > 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("band")> "> > "> > > & Catalog("date") & "</font></td><td><font size='1'>" &it!> &> > "</font></td><td><font> > > "</font></td><td><font size='1'>" & Catalog("venue") &
> > > "</font></td><td><font size='1'>" & Catalog("time") &> > > 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>> > If> >> > > anyone can help with this I would be very grateful indeed.
> > >
> > > Geoff Wickens
> > > Bedford Town Band
> > >
> > >
> >
>
Geoff Wickens Guest



Reply With Quote

