# GC.Spread.Sheets.ConditionalFormatting.DateCompareType

## Content

# Enumeration: DateCompareType

[Sheets](../modules/GC.Spread.Sheets).[ConditionalFormatting](../modules/GC.Spread.Sheets.ConditionalFormatting).DateCompareType

Specifies the date compare type.

**`example`**
```javascript
//This example validates cell data.
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.dateCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.DateCompareType.before, expected: new Date(2012, 11, 31)});
var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
spread.options.highlightInvalidData = true;
activeSheet.setValue(0, 0, new Date(2012, 12, 12));
```

## Table of contents

### Enumeration members

- [after](GC.Spread.Sheets.ConditionalFormatting.DateCompareType#after)
- [afterEqualsTo](GC.Spread.Sheets.ConditionalFormatting.DateCompareType#afterequalsto)
- [before](GC.Spread.Sheets.ConditionalFormatting.DateCompareType#before)
- [beforeEqualsTo](GC.Spread.Sheets.ConditionalFormatting.DateCompareType#beforeequalsto)
- [equalsTo](GC.Spread.Sheets.ConditionalFormatting.DateCompareType#equalsto)
- [notEqualsTo](GC.Spread.Sheets.ConditionalFormatting.DateCompareType#notequalsto)

## Enumeration members

### <a id="after" name="after"></a> after

• **after** = `4`

Indicates whether the date time is after a certain time.

___

### <a id="afterequalsto" name="afterequalsto"></a> afterEqualsTo

• **afterEqualsTo** = `5`

Indicates whether the date time is after or equal to a certain time.

___

### <a id="before" name="before"></a> before

• **before** = `2`

Indicates whether the date time is before a certain time.

___

### <a id="beforeequalsto" name="beforeequalsto"></a> beforeEqualsTo

• **beforeEqualsTo** = `3`

Indicates whether the date time is before or equal to a certain time.

___

### <a id="equalsto" name="equalsto"></a> equalsTo

• **equalsTo** = `0`

Indicates whether the date time is equal to a certain time.

___

### <a id="notequalsto" name="notequalsto"></a> notEqualsTo

• **notEqualsTo** = `1`

Indicates whether the date time is not equal to a certain time.
