Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 15th, 2004, 03:56 AM
Authorized User
 
Join Date: Nov 2003
Location: Darwen, , United Kingdom.
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

Reply With Quote
  #2 (permalink)  
Old July 15th, 2004, 04:04 AM
Friend of Wrox
Points: 2,376, Level: 20
Points: 2,376, Level: 20 Points: 2,376, Level: 20 Points: 2,376, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Australia.
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.
======================================
Reply With Quote
  #3 (permalink)  
Old July 15th, 2004, 04:29 AM
Authorized User
 
Join Date: Nov 2003
Location: Darwen, , United Kingdom.
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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:21 PM.


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