473,398 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

UK/US Format Data Entry and DataBase Storage

Hi All

We are creating a multi-region ASP application which will be using SQL
Server 2000.

As our users exist in multiple location i.e. UK, US, Australia how can we
distinguish that the date the user is entering is captured correctly i.e. no
confusion with DD/MM/YYYY format.

I guess to remove database ambiguity I am going to use the format YYYYMMDD
format but how do I know in the first place when the user entered 01/06/2006
that the user meant 1st June 2006 or 6th Jan 2006.

Any help is appreciated.

Aug 8 '06 #1
2 1929

JP SIngh wrote:
>
I guess to remove database ambiguity I am going to use the format YYYYMMDD
format but how do I know in the first place when the user entered 01/06/2006
that the user meant 1st June 2006 or 6th Jan 2006.
I always store dates in the format yyyy-mm-dd hh:mm:ss.mmm as it makes
more logical sense (largest ---smallest) and -- as you point out --
removes any regional discrepancies.

Take a look at this:
http://www.aspfaq.com/show.asp?id=2040

Aug 8 '06 #2
JP SIngh wrote:
Hi All

We are creating a multi-region ASP application which will be using SQL
Server 2000.

As our users exist in multiple location i.e. UK, US, Australia how
can we distinguish that the date the user is entering is captured
correctly i.e. no confusion with DD/MM/YYYY format.

I guess to remove database ambiguity I am going to use the format
YYYYMMDD format but how do I know in the first place when the user
entered 01/06/2006 that the user meant 1st June 2006 or 6th Jan 2006.
You can tell them to enter the data in the proper format, or use one of the
many javascript calendar controls which can be found via a google search.
>
SQL Server will not store any format with the dates it stores. A datetime
column stores dates as paired integers, the first of which containing the
number of days since the seed date, and the second of which containing the
number of milliseconds since midnight for the time portion. If no date is
supplied (time only) then 0, or the seed date will be stored. If a date with
no time is supplied, then 0, or midnight, will be stored.

It is up to the application that is retrieving the data to apply the proper
date format to the datetimes. vbscript has some date formatting capability.
You can also use the T-SQL CONVERT() function to convert the datetime to a
string containing the date with the desired format (it's easy if you
remember that strings contain format: other datatypes rarely contain format)

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Aug 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mark Everett | last post by:
Hi, I am currently running out of space on one of my database servers. Is it possible to move the relevant files for tables onto another drive and instuct MySql to use both folders for it's...
6
by: Sami | last post by:
Problem: Social Security number being used in a database. First problem is that it will not permit numbers beginning in zero to be entered - it sees it as a null or empty space from what I can...
2
by: Kevin Myers | last post by:
Hello, Have yet another problem on a form that has me stumped. In a table that I am working with, the values for one of the fields are stored in meters. However the values that are supplied for...
1
by: Patrick | last post by:
Hi all, New to .NET, I'm working on an Winforms client application using VS 2005 beta2. My needs considering data storage are the followings: (1) Small files (0 < length < 10 mb), containing...
5
by: fkater | last post by:
Hi, we need to enter lots of data which are basicly descriptions of pc hardware configuration like this: Mainboard: vendor=... #of PCI slots=3 slot 1 graphic adapter
9
by: insomniux | last post by:
Hi, I am having a problem with formatting the default value of a date field. It has been discussed earlier in many topics, but still I cannot solve the problem. What's happening: I have various...
6
by: Kyle Teague | last post by:
What would give better performance, serializing a multidimensional array and storing it in a single entry in a table or storing each element of the array in a separate table and associating the...
14
by: Manish | last post by:
The project I am developing doesn't involves database. I want to parse the mailbox file (.mbx) and store the summary in the text file for fast retrieval and display of information in the Inbox...
1
by: NumberCruncher | last post by:
Hi All, I am struggling with setting up my first system of tables, forms,and reports, and could use your help! I am setting up a database to keep track of the production of a produced item. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.