Subject: Formatting date search in the UK
Posted By: peterasimpson Post Date: 2/17/2006 9:28:25 PM
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.

Thanks
Pete*

Reply By: digby_dog Reply Date: 2/18/2006 9:09:05 AM
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.
Reply By: nalla Reply Date: 2/20/2006 10:58:07 PM

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

Go to topic 40339

Return to index page 364
Return to index page 363
Return to index page 362
Return to index page 361
Return to index page 360
Return to index page 359
Return to index page 358
Return to index page 357
Return to index page 356
Return to index page 355