Solved

FrontPage Date Format - The "new column" trick

Posted on 2004-09-08
5
190 Views
Last Modified: 2013-12-24
Greetings!  I hope someone can help me with a date format problem I'm having.

The scenario:

1. I have an Access database with a date field.
2. The date is formatted as MM/DD/YYYY.
3. Using the FrontPage Database results wizard, I add my database results to an active server page.
4. After uploading to my server, the displayed format changes to DD/MM/YYYY.

What I need to accomplish:

I need to display the date in MM/DD/YYYY format.

Now, there's definitely a method to solve my problem.  It involves adding a custom query to the database results wizard.  This query creates a new date column (such as "date2"), which is displayed properly on the page.

My question:

How do I create this query?

I know someone here will know, and I thank anyone and everyone who tries to help.

Thanks so far,

Courtney
0
Comment
Question by:LilCourt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:rcmb
ID: 12020551
You can easily manipulate the format with VBScript by changing your results in your ASP code to:


date will equal the name of the field in the database
<%
varDay = Day(fp_rs("date"))
varMonth = Month(fp_rs("date"))
varYear = Year(fp_rs("date"))
%>

then display in your table column as (note: you will need to delete the FP generated field in the column)

<%=varMonth%>/<%=varDay%>/<%=varYear%>

RCMB
0
 

Author Comment

by:LilCourt
ID: 12022440
Thanks for responding, rcmb!  That'll get the desired result, but it's not exactly what I'm looking for.  The method I'm talking about doesn't really require any changing of the ASP code, which is what I'm going for.  I wish I could explain this better, but I really don't know how.

In any case, thank you very much for this suggestion.
0
 
LVL 12

Accepted Solution

by:
rcmb earned 135 total points
ID: 12026068
Okay here is a sample SQL query you can enter directly into the FP DBRW (select custom query in step 2) that will format the date as desired:

SELECT StartTime, EndTime, (Month(EventDate) & '/' & Day(EventDate) & '/' & Year(EventDate)) AS MyDate, Location, Approved, DateAdd, DateMod FROM Events

Pay attention to the date formatting (Month(EventDate) & '/' & Day(EventDate) & '/' & Year(EventDate)) AS MyDate so you can manipulate the order as desired.

Once you are complete with the DBRW it will display MyDate in the column or location you desire.

RCMB
0
 

Author Comment

by:LilCourt
ID: 12030376
I love you!  You're the best!

Courtney
0
 
LVL 12

Expert Comment

by:rcmb
ID: 12030405
Wow - can I help you more!!!

Thanks for the points and glad we got this working.

Curtis
0

Featured Post

Three Considerations for Containers

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read our article on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question