문제

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top