Code/C#

C# SQLite DateTime 읽기

Segel 2021. 6. 27. 10:13

문제:

    SQLiteDataReader로 date 타입의 데이터를 읽어올 때 FormatException 발생

해결:

    SQLiteConnection의 connectionString에 'datetimeformat=CurrentCulture' 추가

예시:

new SQLiteConnection("Data Source=test.db;datetimeformat=CurrentCulture");

 

반응형