Article ID: 210069 - Last Review: June 23, 2005 - Revision: 2.0 ACC2000: How to Format Dates as U.S. Dates Regardless of Regional SettingsThis article was previously published under Q210069 Advanced: Requires expert coding, interoperability, and multiuser skills.
SUMMARY
When you use Visual Basic for Applications to concatenate dates into an SQL
string, you must use a standard U.S. date format, regardless of the region that you have set in the Regional Settings tool in Control Panel. This article shows you how to create a custom function to convert any date into a U.S. date format. Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. MORE INFORMATIONCAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database. To format dates regardless of regional settings, you can create a Visual Basic for Applications function. To do so, follow these steps:
REFERENCES
For additional information about concatenating SQL strings, please see the following article in the Microsoft Knowledge Base:
210244
(http://support.microsoft.com/kb/210244/EN-US/
)
ACC2000: Errors Concatenating Variables or Controls
| Article Translations
|
Back to the top
