datetime class : Less(datetime) method
Description
Gets a value that indicates whether the argument advanced than the invoker.
Syntax
datetimeInstance.Less(datetime argDatetime)
Arguments
Class | Name | Description |
datetime | argDatetime | A datetime class instance that is compared. |
Return value
Class | Description |
bool | A value that indicates whether the argument advanced than the invoker. |
Sample code
1: | datetime dt = new datetime(2013,12,14,10,10,9); |
2: | datetime dt2 = new datetime(2013,12,14,10,10,8); |
3: | datetime dt3 = new datetime(2013,12,14,10,10,10); |
4: | bool less1 = dt.Less(dt); // false |
5: | bool less2 = dt.Less(dt2); // false |
6: | bool less3 = dt.Less(dt3); // true |
Notes
If the argument advanced than the invoker, returns true. Otherwise, return false.
Links for reference
None