Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 27th, 2005, 09:44 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 198
Thanks: 2
Thanked 0 Times in 0 Posts
Send a message via MSN to itHighway
Default Session.LICD - Date Format Problem

Hello!

I'm having problem with Session.LCID. I haven't used this function much.

The problem is with the date format. I am working on a website from Australian Client, where the date format is "dd/mm/yyy".

The problem is when the date is greater then 12 then it shows the date in correct format i.e "dd/mm/yyy" else it shows the date in "mm/dd/yyyy".

Example:

Session.LCID = 3081 (for Australia)

5/08/2005 -- When the date is less then 12 then this is what I get. It should be 8/5/2005 i.e 8th May 2005


27/5/2005 -- When the date is greater then 12 then it shows date in correct format.


Any Idea..
Any Help...



 
Old May 29th, 2005, 07:14 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

;;;The problem is when the date is greater then 12 then it shows the date in correct format i.e "dd/mm/yyy" else it shows the date in "mm/dd/yyyy".

I doubt this. The date being served is either dd/mm/yyyy or mm/dd/yyyy, I dont believe date figures can change or interact with formats.

Anyhow - I am in Aussie and have come accross this problem/solution more than once (on different OS's) What OS (IIS version) is your server?

Have a good read of this post:
http://p2p.wrox.com/topic.asp?TOPIC_...Cdate%2Cformat

The solution for OS < 2003 server is on page two (Registry change) - some useful date formatting functions one page one.

For 2003 IIS 6.0:
http://p2p.wrox.com/topic.asp?TOPIC_ID=30844

;;;I'm having problem with Session.LCID
Are you placing this code in your global.asa file?
If the global.asa is not in the root of your IIS default web site you need to make it a virtual directory

To avoid issues I run functions around all of my dates on all of my pages now. This way you will always show your intended format no matter what the servers settings are.

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Date format problem abhishekkashyap27 C# 2005 1 June 23rd, 2008 02:25 AM
Date Format Problem cyberddindia Classic ASP Basics 2 October 23rd, 2006 01:49 AM
Date Format Problem Scripts82 Access VBA 2 March 13th, 2006 09:36 PM
Date format problem ERC Crystal Reports 1 June 15th, 2005 04:03 AM
Date format problem widad Classic ASP Basics 1 October 15th, 2004 06:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.