Skip to content

What's the difference between DbType.Time and DbType.DateTime? #103914

Answered by huoyaoyuan
tacosontitan asked this question in Q&A
Discussion options

You must be logged in to vote

DbType is a maps to ODBC type:

case DbType.Date: return s_date;
case DbType.Time: return s_time;
case DbType.DateTime: return s_dateTime;

private static readonly TypeMap s_dateTime = new TypeMap(OdbcType.DateTime, DbType.DateTime, typeof(DateTime), ODBC32.SQL_TYPE.TYPE_TIMESTAMP, ODBC32.SQL_C.TYPE_TIMESTAMP, ODBC32.SQL_C.TYPE_TIMESTAMP, 16, 23, false);
private static readonly TypeMap s_date = new TypeMap(OdbcType.Date, DbType.Date, typeof(DateTime), OD…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tacosontitan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants