datetime format

pisceswzh

Well-known member
Joined
Mar 19, 2007
Messages
96
Programming Experience
1-3
Hi,

One of my users has just reported to me that my application cannot work if the Region setting of the PC to be English (United Kingdom) (its date time format is dd/MM/yyyy). I tested and it turns out to be true.

Generally the users who use my application set the Region setting to be English (United States) (its date time foramt is MM/dd/yyyy) or Chinese (P.R. China) (its datetime foramt is yyyy年MM月dd日) and everyting works fine both ways.

I think it should be the OS or Dotnet framework to handle the data time format issue, shoudn't it?

Anyone else met this problem before and any solution?

Thanks.
 
dd/MM/yyyy etc is STRING representations of Date values. As long as you handle a Date as a Date there should be no problem. Date values aren't affected by different cultures, while they are usually displayed differently as strings.
 
I think it should be the OS or Dotnet framework to handle the data time format issue, shoudn't it?

It is if you used DateTime in your app instead of strings.. but oh dear.. The solution could be quite complex, depending on how much of a mess your code is.. You'd better start posting examples, but be warned: If they are SQL and you havent written them in good form as outlined in the PQ link in my signature, then I'll only go and tell you to rework them all properly! :)
 

Latest posts

Back
Top