Click or drag to resize

DateTimeExtensionsToTimestamp Method

Converts DateTime to Timestamp while preserving the milliseconds. The method generates a timestamp object of as specified by the outputFormat param.

Namespace:  MFiles.VAF.Configuration
Assembly:  MFiles.VAF.Configuration (in MFiles.VAF.Configuration.dll) Version: 2.1.0.1 (2.1.0.1)
Syntax
C#
public static Timestamp ToTimestamp(
	this DateTime dateTime,
	DateTimeKind outputFormat = DateTimeKind.Local
)

Parameters

dateTime
Type: SystemDateTime
The dateTime object to convert.
outputFormat (Optional)
Type: SystemDateTimeKind
Specifies how the date time should be formatted before conversion.

Return Value

Type: Timestamp
Timestamp of the passed output format locality.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DateTime. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also