server| Data | questions
Because of my working environment, access to SQL Server based on different languages, encounter a lot of trouble,
Where the DateTime data class, Chinese, Korean and other databases in the default format of the time is: Mm/dd/yy or YY/MM/DD
But English is also divided into: Mm/dd/yy or Dd/mm/yy
That's the problem.
For example:
One of my Korean clients, operating system: Windows Server English, MS SQL Server Korean version
His mainframe in New Zealand,
Time system defaults to New Zealand Dd/mm/yy
Database time defaults to: Mm/dd/yy
When the database is updated, or when the time query command is executed, for example
Select Update_time
From Order_Details
where Update_time > Convert (DateTime, ' vardateinput ', 121)
vardateinput= 16/11/2004
On a host or client that defaults to Dd/mm/yy in practice, the time is November 16
But the database time defaults to: Mm/dd/yy
Errors are immediately generated
How to correct the simple, here I will not say more, just in the internationalization of today, I hope that China's "master"
Be aware of these "internationalization" requirements
Try to avoid some "low-level" mistakes, and spend your time writing more, newer, creative programs.
Sometimes simple problems can haunt us for a few days of valuable time, only this in your mutual encouragement, you are welcome to share!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.