Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DateTime Less Than Operator

Determines whether one specified DateTime is less than another specified DateTime.

[Visual Basic]
returnValue = DateTime.op_LessThan(t1, t2)
[C#]
public static bool operator <(
 DateTime t1,
 DateTime t2
);
[C++]
public: static bool op_LessThan(
 DateTime t1,
 DateTime t2
);
[JScript]
returnValue = t1 < t2;

[Visual Basic] In Visual Basic, you can use the operators defined by a type, but you cannot define your own. You can use the Compare method instead of the DateTime less than operator.

[JScript] In JScript, you can use the operators defined by a type, but you cannot define your own.

Arguments [Visual Basic, JScript]

t1
A DateTime.
t2
A DateTime.

Parameters [C#, C++]

t1
A DateTime.
t2
A DateTime.

Return Value

true if t1 is less than t2; otherwise, false.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

DateTime Structure | DateTime Members | System Namespace | Boolean

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.