"Dan" <> wrote in message
news

B165EFE-EBC0-4567-A8BE-...
|
| ".Len B" <> wrote in message
| news:...
| > I have partial responsibility for a website. On a particular page
dates
| > must be displayed. The data is drawn from a backend access database
using
| > vbscript.
| >
| > <%=(Recordset1.Fields.Item("News_Date").Value)%>
| >
| > On some computers the date displays in US format, mm/dd/yy and on
others
| > I see dd/mm/yy. In all cases, Regional Settings are set to
| > English(Australia) and Location=Australia. Short Date shows as
29-Dec-09.
| > In unrelated access databases, dates show correctly if the texbox
format
| > is blank or set to ShortDate.
| >
| > Any ideas on -
| > why the display is inconsistent or
| > how to force a consistent display based on RegionalSettings.
| >
|
|
| Your use of <%= suggests that you are using ASP on the server. Are you
sure
| the format changes from computer to computer? As the code is running on
the
| web server it should be consistent, unless you are also using windows
| authentication and there are differing regional settings on the web
server
| for these user accounts (if the server is part of an ADS configuration
then
| you'll need to change the user account regional settings in ADS).
Localised
| regional settings on the computers are irrelevant here - it's the
server
| that is turning the date data into a string and placing it in the web
page.
|
| If you are happy to force the date format no matter what the browser
| settings might be, then you can simply write a function to fix the date
| format no matter what the regional settings of the web server user
account
| are. For this you can use the Session.LCID property, which will force
the
| locale for the rendering of the web page at the server side, eg. at the
top
| of the ASP source add
|
| <% Session.LCID = 2057 %>
|
| to force dd/mm/yyyy format (2057 is UK English), or 1033 for mm/dd/yyyy
| format (this is the General Unicode locale which uses US date
formatting).
|
| You may have better luck posting in a newsgroup specific for the
platform -
| assuming Classic ASP (as opposed to ASP.NET) on IIS try
| microsoft.public.asp.general , microsoft.public.asp.db , or
| microsoft.public.inetserver.iis
|
| --
| Dan
|
Thanks Dan, very helpful.
Yes, straight ASP. All clients GMT+10 but different client locations
spread by probably 40 miles, web server in Boston.
I must admit that PA Bear's response confused me in that he was implying
a coding problem. Regardless of poor coding, I expected that the server
would have to be delivering consistent content to all the machines,
either always 'wrong' or always 'right', and despite that, different
versions of IE (6 & 8) on 4 different boxes were displaying different
date content. ??? That's why I asked here rather than in a dev ng.
In writing this reply I think the answer has popped into my head. IIRC,
one of the boxes was the development server running its own local web
server and one of the tests was probably done 'locally' thus delivering
the 'correct' answer. D'oh!
Thanks guys.
--
Len
__________________________________________________ ____
remove nothing for valid email address.