DateDiff

Returns the difference between the specified dates (or between the specified date and current time step) in the specified time increment.

Returns positive values when the first date is later than the second date, and negative values if the first date is earlier than the second date.

Syntax

DateDiff (date, increment)
    • date:  date to compare
    • increment: time increment

Examples

DateDiff(Now(), Step Daily)

DateDiff(#02/24/2015 08:00, Step Daily)

Syntax

DateDiff(start date, end date, increment)
    • start date:  start date to compare
    • end date: end date to compare
    • increment: time increment

Examples

DateDiff(FromStart(), Now(), Step Daily)

DateDif(#02/28/2015 08:00#, #02/24/2015 08:00#, Step Daily)

Date/Time Functions

Day, DayOfYear, Minute, Hour, Month, Millisecond, Second, Year

Returns the day/the day of year/ minute/ hour/ month/ millisecond/ second/year component of the specified time or current time step.

Syntax

Day(date)

DayOfYear(date)

Minute(date)

Hour(date)

Month(date)

Millisecond(date)

Second(date)

Year(date)
    • date:  optional, if this argument is not specified, current time step will be used.

Examples

Year()

Month(#05/16/2000#)

DayOfYear(Now())