DateDiff

Returns the difference of the specified dates (or specified date to current time step) in the specified time increment.

Positive values are returned, if the first date is later than the second date, negative values are returned, 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())