EDATE

This function (available since iWay Enable version 1.1) allows date and time manipulations and calculations.

_EDATE() - This signature returns the current time in milliseconds.

_EDATE (timeMilliSec,format) - This signature takes a date-time in milliseconds and a format which describes the pattern with which to format the date time.

Parameter

Type

Required/
Optional

Description

timeMilliSec

long

Required

Specifies the date-time.

format

String

Required

Specifies the date-time pattern.

_EDATE (timeMilliSec,amount,datePart) - This signature takes a date-time in milliseconds and adds/subtracts the value specified by amount and applies it to the date part specified by datePart in the date-time timeMilliSec. For example, if the timeMilliSec equates to December 25, 2000, the amount is -1, and the datePart is 'd', this function will subtract 1 (amount) day (datePart) from timeMilliSec and returning December 24, 2000 in milliseconds.

Parameter

Type

Required/
Optional

Description

timeMilliSec

long

Required

Specifies the date-time.

amount

integer

Required

Specifies the amount to add or subtract.

datePart

String

Required

Specifies the part of the date to add or subtract.

Examples:

_EDATE(_EDATE(),'MM/dd/yyyy') will return the current date in 2 digit month/2 digit day/4 digit year format.

_EDATE(_EDATE(_EDATE(),-1,d) ,'MM/dd/yyyy') will return yesterday's date in 2 digit month/2 digit day/4 digit year format.


iWay Software