Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

FrontPage Date Format - The "new column" trick

Posted on 2004-09-08
5
Medium Priority
?
194 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
  • 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 540 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
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…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
Suggested Courses

877 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