how can I get a date?

S

Stu Pedasso

if you enter a date into a database in this format:

07/08/03

is there a way to make it display like this:

July 8, 2003

in a web browser when you used the DBRW?

thanks
 
J

Jim Buyens

-----Original Message-----
if you enter a date into a database in this format:

07/08/03

is there a way to make it display like this:

July 8, 2003

in a web browser when you used the DBRW?

FrontPage can't do this, so you have to make Access do
it.

Suppose, for example, that your date field is named
mydatefield. In the DRW, use a custom query and code the
field in the SELECT statement as:

mydatefmt: Format([mydatefield],"mmmm d, yyyy)"

and then specify mydatefmt rather mydatefield as your
output field.

If you don;t want to deal with SQL, create and save an
Access query that uses the same formatting expression in
one column. Then, in the DRW, use the query rather than
the original table as the record source.

Jim Buyens
Microsoft FrontPage MVP
(e-mail address removed)
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
S

Stephen Travis

MS-Access only...

SELECT FORMAT([dbDATE], "mmm, dd, yyyy") AS NewDate FROM...
 
S

Stu Pedasso

right now, my "SELECT" statement looks like this:

fp_sQry="SELECT * FROM Results ORDER BY ID ASC"

Where do I add this formatting tag in this statement?

I use this to format ordinary numbers into currency:

<% If fp_rs("price11") <> 0 then %>
<%=FormatCurrency(fp_rs("price11"))%>
<% Else %>

isn't there a fix that is similar to change the date from
07/08/03 to July 8, 2003?

I don't understand where to put the formatting tag...

thanks
-----Original Message-----
MS-Access only...

SELECT FORMAT([dbDATE], "mmm, dd, yyyy") AS NewDate FROM...

--

Stephen Travis,
Microsoft MVP - FrontPage

if you enter a date into a database in this format:

07/08/03

is there a way to make it display like this:

July 8, 2003

in a web browser when you used the DBRW?

thanks


.
 
S

Stephen Travis

It's done as a custom DRW query not as ASP script...

SELECT *, FORMAT([dbDATE], "mmm, dd, yyyy") AS NewDate FROM Results ORDER BY ID ASC
--

Stephen Travis
Microsoft MVP - FrontPage

Stu Pedasso said:
right now, my "SELECT" statement looks like this:

fp_sQry="SELECT * FROM Results ORDER BY ID ASC"

Where do I add this formatting tag in this statement?

I use this to format ordinary numbers into currency:

<% If fp_rs("price11") <> 0 then %>
<%=FormatCurrency(fp_rs("price11"))%>
<% Else %>

isn't there a fix that is similar to change the date from
07/08/03 to July 8, 2003?

I don't understand where to put the formatting tag...

thanks
-----Original Message-----
MS-Access only...

SELECT FORMAT([dbDATE], "mmm, dd, yyyy") AS NewDate FROM...

--

Stephen Travis,
Microsoft MVP - FrontPage

if you enter a date into a database in this format:

07/08/03

is there a way to make it display like this:

July 8, 2003

in a web browser when you used the DBRW?

thanks


.
 
J

JoAnn Amerson

I thought I was the only person who was thinking along those lines! Besides
which, he probably couldn't handle mature women like us! ;-)

--
The problem with resting on your laurels is that eventually you are sitting
on dead branches.

JoAnn
 

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

Top