dateCompare

Performs a full date/time comparison of two dates.
-1, if date1 is less than date2
0, if date1 is equal to date2
1, if date1 is greater than date2
[datepart - quicky]
yyyy: Year; q: Quarter; m: Month; y: Day of year; d: Day
w: Weekday; ww: Week; h: Hour; n: Minute; s: Second;
l: Millisecond

dateCompare(date1, date2 [, datePart]) → returns Numeric

dateCompare Function Argument Reference

Name Required Default Description
date1 Yes

Example Values:

  • now()
date2 Yes

Example Values:

  • now()
datePart No

Example Values:

  • yyyy
  • q
  • m
  • y
  • d
  • w
  • ww
  • h
  • n
  • s
  • l

Fork me on GitHub