Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 17th, 2006, 10:28 PM
Authorized User
Join Date: Nov 2005
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Formatting date search in the UK

Hi, I'm using VB 2005 and was wondering how come when I use an input box to do a date search in a access database I alway have to format the input box results as MM/dd/yyyy format. I'm in the UK and my windows, office and VB setting are set as standard for the UK which is dd/MM/yyyy.

If somebody in the us was to use my package would they have a problem typing in a search date. In the UK we would type 01/12/2006 (1st Dec 2006) where as in the us they would type (12/01/2006) (Dec 1st 2005). I am concerned because My software is now ready to be released but this might be a small problem.

Can anybody help me.


Simplicity is the key
Old February 18th, 2006, 10:09 AM
Authorized User
Join Date: Oct 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts

I don't know why it does that but I did find that if I change the date from dd/mm/yyyy to dd/mmm/yyyy e.g. 05/10/2005 changed to 05/Oct/2005 it works correctly.

That might be a smaller change to your application.
Old February 20th, 2006, 11:58 PM
Friend of Wrox
Join Date: Dec 2005
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to nalla Send a message via Yahoo to nalla

Hi peterasimpson,
I think it's better if you parameterize your application date format. Save the date format in App.config and retrieve it from there when formatting dates in your application. Don't hard code the date format in your application. Otherwise if another customer requests the application with a different date format. You'll have to maintain a different project for that customer.

nalaka hewage

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP postcode search (UK) BananaJim Classic ASP Professional 3 January 23rd, 2007 01:48 PM
Date Formatting MargateFan XSLT 3 August 30th, 2006 07:42 AM
Date formatting jroxit Classic ASP Basics 3 February 26th, 2006 10:07 PM
Date Formatting ozPATT Excel VBA 2 October 31st, 2005 12:03 PM
Formatting to a Date trekmp ADO.NET 2 March 16th, 2004 01:37 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.