DataSetDateTime DataSetDateTime DataSetDateTime DataSetDateTime Enum

定义

介绍 DateTimeDataSet 列的序列化格式。Describes the serialization format for DateTime columns in a DataSet.

public enum class DataSetDateTime
public enum DataSetDateTime
type DataSetDateTime = 
Public Enum DataSetDateTime
继承
DataSetDateTimeDataSetDateTimeDataSetDateTimeDataSetDateTime

字段

Local Local Local Local 1

DateTime 始终存储为 Local 格式。DateTime is always stored in Local. 如果将 UtcUnspecified 分配给此模式的列,则首先要将其转换为 Local 格式。If Utc or Unspecified is assigned to a column in this mode, it is first converted into Local. 通常以 Local 格式在此模式中执行序列化。Serialization in this mode is always performed in Local. 在序列化期间将产生偏移量。There is an offset during serialization.

Unspecified Unspecified Unspecified Unspecified 2

DateTime 始终存储为 Unspecified 格式。DateTime is always stored in Unspecified. 如果将 LocalUtc 分配给此模式的列,则首先要将其转换为 Unspecified 格式。If Local or Utc is assigned to a column in this mode, it is first converted into Unspecified. 在此模式中的序列化不会产生偏移量。Serialization in this mode does not cause an offset.

UnspecifiedLocal UnspecifiedLocal UnspecifiedLocal UnspecifiedLocal 3

DateTime 存储为 Unspecified 格式。DateTime is stored in Unspecified. 如果将 LocalUtc 分配给此模式的列,则首先要将其转换为 Unspecified 格式。If Local or Utc is assigned to a column in this mode, it is first converted into Unspecified. 在此模式中的序列化将产生偏移量。Serialization in this mode causes offset. 此为默认行为,可向后兼容。This is the default behavior and is backward compatible. 应将此选项在存储区中视为 Unspecified 格式,而在序列化期间应用类似于 Local 的偏移量。This option should be thought of as being Unspecified in storage but applying an offset that is similar to Local during serialization.

Utc Utc Utc Utc 4

DateTime 存储为协调通用时间 (UTC) 格式。DateTime is stored in Universal Coordinated Time (UTC). 如果将 LocalUnspecified 分配给此模式的列,则首先要将其转换为 Utc 格式。If Local or Unspecified is assigned to a column in this mode, it is first converted into Utc format. 通常以 Utc 格式在此模式中执行序列化。Serialization in this mode is always performed in Utc. 序列化时不会产生偏移量。There is no offset during serialization.

注解

DataSetDateTime 无法对设置非DateTime列。DataSetDateTime cannot be set on non-DateTime columns. 设置DateTimeMode属性与在非默认值 UnspecifiedLocalDateTime允许列。Setting the DateTimeMode property with the default value UnspecifiedLocal on non-DateTime columns is permitted. 修改列数据类型从DateTime为任何其他类型重置DateTimeMode为默认值 UnspecifiedLocal。Modifying the column data type from DateTime to any other type resets the DateTimeMode to the default value UnspecifiedLocal.

合并的架构、 关系和 ForeignKeyConstraints 可以执行检查之间DateTime列具有匹配DateTimeMode属性。Checking schema for merging, Relations, and ForeignKeyConstraints can be performed between DateTime columns with matching DateTimeMode properties. 否则应视为列架构不匹配。Otherwise the columns should be considered as non-matching on schema. 唯一的例外是未指定和 UnspecifiedLocal 之间。The only exception is between Unspecified and UnspecifiedLocal. 它允许存在关系或ForeignKeyConstraint两个DateTime中的列Unspecified和其他中UnspecifiedLocal DateTimeModeIt is permitted to have a relation or a ForeignKeyConstraint between two DateTime columns with one in Unspecified and other in UnspecifiedLocalDateTimeMode.

适用于