开发者

Changing language/culture in a MySQL/Dblinq project

开发者 https://www.devze.com 2023-01-14 13:18 出处:网络
I\'m not very familiar in programming databases, but I have a Mysql-Database which I access with Dblinq under C#. Now when I enter dates, numbers etc, the english notation is used, but my customer nee

I'm not very familiar in programming databases, but I have a Mysql-Database which I access with Dblinq under C#. Now when I enter dates, numbers etc, the english notation is used, but my customer needs german. How can I switch my database from english to german? (The开发者_如何学运维 Database is still empty, I can easily re-create it, if needed)

Thanks in advance!

Christian


I am not a C# developer but I use MySQL (and others). Usually dates are stored using the ISO format and I cannot change that, or nobody does that. When you print a date, you should specify a format. So you should retrieve the date from a record and print it in the required format. I know that one of the most used ORM library in C# is NHibernate. Usually with an ORM library you get an object that maps a record and a date field is a property of something like DateTime, a class, so in a pseudo language:

calendar = Calendar.findById(1);
print calendar.event_date.toString("%d/%m/%Y"); # <- prints 03/10/2010
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号