Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Displaying a Date from Database
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Displaying a Date from Database

 Post Reply Post Reply
Author
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post Topic: Displaying a Date from Database
    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, 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?  

 



Edited by Misty
Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post 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.

Edited by Misty
Back to Top
Flamewave View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 June 2002
Location: United States
Status: Offline
Points: 376
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flamewave Quote  Post ReplyReply Direct Link To This Post 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/

- 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.