DataToSQLDateTime Method

Converts a value to a datetime string for SQL.

Definition

Namespace: Aliquo.Core
Assembly: Aliquo.Core (in Aliquo.Core.dll) Version: 5.0.9179.22651
C#
public static string ToSQLDateTime(
	Object value,
	string datePattern = "yyyy-MM-dd HH:mm:ss",
	string dateSymbol = "#",
	bool minValueInYear1900 = true
)

Parameters

value  Object
Value to convert.
datePattern  String  (Optional)
Day pattern.
dateSymbol  String  (Optional)
Date symbol.
minValueInYear1900  Boolean  (Optional)
Indicates if the minimum value is the year 1900.

Return Value

String
String with the value converted.

Remarks

Can return or #yyyy-MM-dd HH:mm:ss#.

See Also