473,799 Members | 3,001 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1946

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
3268
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 data? So basically can you have mulitple data folders setup and if so how is this configured? On another note I could delete some of the older data but the database
6
4822
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 tell. Next, foreign students have & as the initial part of their SSN. How to do this?? Finally, how do I force the cursor to the far left of the field so the
2
3040
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 data entry are in feet. Therefore, I don't believe that I can use a bound text box to support the entry of data for this field. I could use an expression to compute the value for display in the text box as follows: *100/(12*2.54)
1
3938
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 lots of small 'objects' that need to be loaded into memory at runtime, in order to garantee small access time to each 'object'. Each of these 'objects' collection should be able to easily bind to a DataGridView, AND to provide *filtering* and...
5
2075
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
6374
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 forms which are based on an ODBC-linked tables. In one of the forms, I have a control which shows the date of a date field in my database (storage type=date). The default value for the control is set to '=Date()', the format property is set to...
6
3187
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 entries with the entry in the other table? Having a separate table would result in two queries instead of one, but you wouldn't have to deal with the overhead of serializing and unserializing data. -- Kyle
14
2392
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 page. The sugegsted format are as: #1 ID : Subject : To Address: From Address...etc...
1
4787
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 item is a panel, with a specific texture. There are standard panels that are then produced in a limited number of specific textures. The number of panels/project varies, so I keep track of the actual number of panels per project with the count:...
0
9546
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10491
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10247
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10031
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5593
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.