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 July 15th, 2004, 03:56 AM
Authorized User
 
Join Date: Nov 2003
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default date format

Hi,
Im using asp to access an access database. The dates troed in the database are in english format, however whenever i extract the dates or use them from the database they are always displayed in asp in american format. Ive checked my regional settings and these are correct. Is there a registry hack something that i need to do to get asp to recognise im using english dates?

Thanks for your help

 
Old July 15th, 2004, 04:04 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default

This is always an issue.
Whilst I'm sure there must be a way to have the dates expressed correctly.
I strongly recommend manually changing the date going in to and comming out from the database to the required format.
Especially going in as they must at least be stored correctly.
Use YYYY-MM-DD to avoid any US Format problems for entering in the database.
And what ever suits you for display on the way out.

This should be a regular practise when validating data for entry into the database.
The same as you would trim strings or expand single quotes ' to ''.



======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
 
Old July 15th, 2004, 04:29 AM
Authorized User
 
Join Date: Nov 2003
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Cheers thats great, ive also found a way that you can permanently select the regions (date formats etc). When you are changing the regions in control panel (presuming you are in a windows environment) you need to change the default settings to whatever region you need, simply changing the settings wont work, as iis looks at the default settings in the registry and uses the region that appears there.

I would imagine however that you still need to use some form of date management as described in the previous post if you are in a multi user enviroment, ie a situation where many pcs may be using different regional settings.

Thanks again






Similar Threads
Thread Thread Starter Forum Replies Last Post
date format differs, need to force format somehow patricolsson ASP.NET 2.0 Basics 1 December 3rd, 2009 12:53 AM
Convert British format date to American format? fyr PHP How-To 0 December 19th, 2007 03:17 PM
Help with date format gregalb SQL Server 2000 1 February 13th, 2007 10:15 AM
How to give Date format while entering date Subuana Beginning VB 6 4 March 17th, 2006 07:25 AM
date format differs, need to force format somehow patricolsson HTML Code Clinic 2 January 12th, 2006 05:55 AM





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