Print Page | Close Window

Displaying a Date from Database

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=7426
Printed Date: 01 April 2026 at 1:00am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Displaying a Date from Database
Posted By: Misty
Subject: Displaying a Date from Database
Date Posted: 20 November 2003 at 11:57am

I am very frustrated because I want to display dates like: 11/19/2003 on an ASP page from an Access 2003 database. I didn't have this problem with Access 2000. But it is strange because I thought that Access 2003 database was in 2000 format.

I tried to do some of the things at http://www.learnasp.com/learn/datetime.asp - http://www.learnasp.com/learn/datetime.asp , but I have been unsuccessful so far. For example, I did something like <%= FormatDateTime(MyDate,1) %>  The date shows up as 19/11/2003. 

For your information,the Access database shows the correct date format.

Can anyone please help me to figure out what is wrong?  

 




Replies:
Posted By: MadDog
Date Posted: 20 November 2003 at 12:17pm
Its showing it like that because of the date format your computer is set to (different country format).

If you add "Session.LCID = 1033" it should format it differently because it sets up the date format for the US.
If you look at the ASP section on this site it has more detail on the LCID and more numbers for different country formats.

-------------
http://www.iportalx.net" rel="nofollow">


Posted By: Misty
Date Posted: 20 November 2003 at 12:39pm
Thank you for the information! I think I've fixed this problem. I went back to my Access database. I entered short date for the input mask. There's nothing in format now. It is working for me now.


Posted By: Flamewave
Date Posted: 20 November 2003 at 1:32pm

If it helps you at all, I have a date formatting function that I wrote that allows you to format the date to display any way you want it to.

http://www.flameservers.com/asp_apps/dateformat/ - http://www.flameservers.com/asp_apps/dateformat/



-------------
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net