magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 2000 > 09 > Programming Feature  

Same Time Next Month?

By Brian Jepson

If you've scheduled something to occur on 12/5/2000, should you expect it to happen on December 5 or May 12? The answer often depends on which country you're in at the time. It also depends on the date format configured in your database. If you're planning to accept orders from customers in other countries, inserting a date with a nonstandard format into your database could cause serious problems. Customers' credit cards could be rejected based on incorrect expiration dates. Orders could be delivered late, or not at all. And bank transactions could go through at unexpected times.

The solution is to standardize your applications and databases on one date format. Date formats can be tricky. Many database systems allow flexible date formats, but not all systems agree on the same one (see Table 1). With international applications, or even applications that need to work with more than one database system, inconsistencies across date formats can be a major pitfall. What's worse, the supported date formats may not be familiar to your users.

How can you get your applications to accept date data in the format you want? Does every INSERT and UPDATE mean your applications have to convert from the locale-specific date format to a format the database supports? Conversely, will every SELECT statement require that your application convert dates from the native database format to a format recognizable in your application's locale?

If you're using a database system that's flexible with date formats, the answer is no.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2