regional settings - ASP and IIS

How will IIS treat the regional language setting ? I have a web app, within the asp page, I have certain date fields. These are bound to datetime fields (ado types) in com objects. When a user enters 01/02/2008 and the regional setting is mm/dd/yyyy then it will be sent
to sql server as January 02 2008. My question is what will happen if a user logged from UK saves a record ? Will this be February 1st 2008 (dd/mm/yyyy) in the business object? These are com dlls. My webserver control panel regional setting has a format of mm/dd/yyyy.

This is always a big issue as I'm Australian (dd/mm/yyyy) and MS defaults everything to the US date format (mm/dd/yyyy) and I've developed a site for selling products to 15 different countries. I've found

This is always a big issue as I'm Australian (dd/mm/yyyy) and MS defaults everything to the US date format (mm/dd/yyyy) and I've developed a site for selling products to 15 different countries. I've found the best thing to do is to pass all dates through a function that forces their format. Two that I use regularly are included below:

Public Function DateToSQL( strDate )
' Takes date of form D/M/YYYY and converts to YYYY-MM-DD format for SQL use
Dim aDate

aDate = Split( strDate, "/" )

If Len( aDate(1) ) = 1 Then
aDate(1) = "0"& aDate(1)
End If
If Len( aDate(0) ) = 1 Then
aDate(0) = "0"& aDate(0)
End If

On your site, you need to either tell the user how to enter the date which many people are fine with because the Internet is so international::
Birth Date: ______ (mm/dd/yyyy)

Or you need to check some browser variables of the user to estimate the country they are from and revamp your site to match that format. This is a very convoluted method and there's no promise that you will pick the right region or that the user will enter the date guessing at -your- date format.

So I suggest use the above code and just request the user enter one format and you show them the same format back.

0

Featured Post

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed.
What it does:
1.) Creates log file in the directory the script is run from (if it doesn't already exist)
2.) Sweep…

This is pretty cool. The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…

Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail. The methods are covered in more detail in o…