Class DatabaseDateTimeHandlerExtensions
Helper class for converting Datetime to/from database
Inheritance
System.Object
DatabaseDateTimeHandlerExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Data
Assembly: EPiServer.Data.dll
Version: 9.12.2Syntax
public static class DatabaseDateTimeHandlerExtensions
Methods
ConvertToDatabase(DatabaseDateTimeHandler, Nullable<DateTime>)
Convert a nullable datetime, if the value is null then returns null otherwise convert the value for storing in database.
Declaration
public static DateTime? ConvertToDatabase(this DatabaseDateTimeHandler dateTimeHandler, DateTime? value)
Parameters
Type | Name | Description |
---|---|---|
DatabaseDateTimeHandler | dateTimeHandler | The datetime handler |
System.Nullable<System.DateTime> | value | The value |
Returns
Type | Description |
---|---|
System.Nullable<System.DateTime> | null if the value is null otherwise converted datetime |