Click or drag to resize

DateTimeExtensionsBaselinedTimestamp Method

Creates a baselined timestamp which begins at the specified time interval.

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.205-beta+5ef4169f3b1079d8b163dd363614f656bd140924
Syntax
public static DateTime BaselinedTimestamp(
	this DateTime timestamp,
	BaselineTimeInterval interval
)
View Source

Parameters

timestamp  DateTime
Timestamp to baseline.
interval  BaselineTimeInterval
BaselineTimeInterval to which timestamp should be baselined.

Return Value

DateTime
A new DateTime value that represents a baselined timestamp that begins at the specified BaselineTimeInterval.

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).
Remarks
Baselining to the Second would return the DateTime value starting at zero milliseconds.
Baselining to the Minute would return the DateTime value starting at zero seconds and milliseconds.
Baselining to the Hour would return the DateTime value starting at zero minutes, seconds and milliseconds.
Baselining to the Day would return the DateTime value starting at zero hours, minutes, seconds and milliseconds.
Baselining to the Month would return the DateTime value starting at day one, zero hours, minutes, seconds and milliseconds.
Baselining to the Year would return the DateTime value starting at month one, day one, zero hours, minutes, seconds and milliseconds.
See Also