DateExtensions GetIsoDateTime Method Delta Engine Documentation

Namespace: DeltaEngine.Extensions
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public static string GetIsoDateTime(
	this DateTime dateTime
)

Return Value

Type: String

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

Tests: DeltaEngine.Tests.Extensions.DateExtensionsTests
Examples

1 unit tests call DeltaEngine.Extensions.DateExtensions.GetIsoDateTime(System.DateTime)
[Test]
public void GetIsoDateTime()
{
    var testTime = new DateTime(2013, 11, 17, 13, 6, 1);
    Assert.AreEqual("2013-11-17 13:06:01", testTime.GetIsoDateTime());
    AssertDateTime(testTime, DateTime.Parse(testTime.GetIsoDateTime()));
}
See Also