Date and Time Function D-E

UDP ›› Functions ›› Date and Time Functions ››
Parent Previous Next

      

Function:  

DATE  

Description:  

Returns the date constant built from the given numbers  

Parameters:  

An integer constant indicating day (1-31), an integer constant indicating month (1-12), an integer constant indicating year  

Example:  

If  DATE (DAY_OF_MONTH (Account.OpeningDate), 4, 2004) = 07/04/2004 Then …

   

Function:  

DATE_ADD  

Description:  

Returns the date resulting from adding/subtracting the specified number of days to the specified date  

Parameters:  

An expression producing date and an expression producing a number to be added or subtracted (if the number is negative) to the date  

Example:  

If  DATE_ADD (Account.OpeningDate), 4) = 07/04/2004 Then …

   

Function:  

DATE_PART  

Description:  

Returns the date part of the given timestamp  

Parameters:  

Timestamp  

Example:  

If  DATE_PART (Account.OpeningDateTime) = 07/04/2004 Then …

   

Function:  

DAY_DIFFERENCE  

Description:  

Calculates the day difference between the two dates as an integer constant  

Parameters:  

Two attributes of the Date type or date constants or calculations producing date  

Example:  

If  DAY_DIFFERENCE (Account.OpeningDate, Account.ClosingDate) = 3 Then …

   

Function:  

DAY_DIFFERENCE2  

Description:  

Calculates the day difference between the first date and the second date ignoring years of the dates.

For example:

DAY_DIFFERENCE2 (15/06/1985, 17/06/1998) = 2

(the difference between 15 of June and 17 of June is 2)

DAY_DIFFERENCE2 (15/06/1985, 14/06/1973) = 364

(the difference between 15 of June and 14 of  June is 364)

The function can be useful, for example, when determining next anniversary of some event.  

Parameters:  

Two attributes of the Date type or date constants or calculations producing a date  

Example:  

If  DAY_DIFFERENCE2 (CURRENT_DATE, Client.DateOfBirth) = 2 Then SEND GreetingEmail TO Client

   

Function:  

DAY_OF_WEEK  

Description:  

Returns day of week of the provided date as a string (‘Monday’, ‘Tuesday’ etc)  

Parameters:  

Attribute of the Date type or date constant or calculation producing a date  

Example:  

IF DAY_OF_WEEK (Account.OpeningDate=’Wednesday’) Then …

   

Function:  

DAY_NUMBER_IN_WEEK  

Description:  

Returns day of week of the provided date (1 for Sunday, 2 for Monday etc)  

Parameters:  

Attribute of the Date type or date constant or calculation producing date  

Example:  

IF DAY_NUMBER_IN_WEEK (Account.OpeningDate=1) Then …

   

Function:  

DAY_OF_MONTH  

Description:  

Returns day of month of the provided date as an integer constant in the range 1-31  

Parameters:  

Attribute of the Date type or date constant or calculation producing a date  

Example:  

IF DAY_OF_MONTH (Account.OpeningDate=25) Then …

   

Function:  

DAY_OF_YEAR  

Description:  

Returns day of year of the provided date as an integer constant in the range 1-366  

Parameters:  

Attribute of the Date type or date constant or calculation producing a date  

Example:  

IF DAY_OF_YEAR (Account.OpeningDate=250) Then …

   

Function:  

DAYS  

Description:  

Returns an integer constant indicating the number of days in the provided duration  

Parameters:  

Attribute of the Duration type or duration constant or calculation producing duration  

Example:  

If  DAYS (Task.Duration) =  5 Then …

   

Function:  

END_OF_WEEK  

Description:  

Returns a date being Sunday of the week that the parameter date represents  

Parameters:  

Attribute of the Date type or duration constant or calculation producing Date