Last post Aug 31, 2020 10:26 PM by PaulTheSmith
Aug 30, 2020 08:26 AM|rajemessage|LINK
Aug 31, 2020 02:36 AM|yij sun|LINK
Accroding to your description,do you have codes?
Aug 31, 2020 03:50 AM|rajemessage|LINK
can u tell me where this formate is set in English with one example?
because windows and browser setting is in the hand of the user.
Aug 31, 2020 06:23 AM|PaulTheSmith|LINK
Can you expand this a little? Do you mean that if the user types "couleur" (French) in a textbox you want to store "colour" (en-gb) in the database? Or do you want to store "color" (en-us) in the database?
It might be easier to put a note at the top of the web page saying "All input in American English (or British English, or Canadian English, or Belize English or whichever one you consider to be 'English') Please"
Aug 31, 2020 08:56 AM|yij sun|LINK
what should I do if my website accepts DateTime, text and number in English and shows them in the same way?
we keep everything in English in the database
As far as I think,your data in the database is American English and it will show in American English.
I don't understand your requirment.You could tell more details of your reuqirment to us.
Aug 31, 2020 11:23 AM|rajemessage|LINK
be in en-US.
but as u know end-user can change the DateTime, region, language in windows and browser language also.
so my question what are the measures I should take to prevent them from entering wrong DateTime or text.
Aug 31, 2020 10:26 PM|PaulTheSmith|LINK
Are you sure that you have a problem? A Date in Excel is a NUMBER - the number of days since the start of last century. There is no 'English' date or any other language. A DateTime in a database is a NUMBER. There is no 'English' or any other language
for a DateTime.
How can you stop them entering the wrong date? You can't. People can always make mistakes or tell lies.
How can you stop them entering the wrong text? You can't. People can always make mistake or tell lies. (Have you seen what happens on the internet?)
Try to create the problem that concerns you. If you have an actual problem then show us your code, the input that gives the wrong result and what you would like the result to be for that wrong input.