Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 (Français) » QAnywhere » QAnywhere reference » QAnywhere transmission and delete rules » Rule syntax

 

Rule functions

You can use the following functions in transmission rules:

Syntax Description
DATEADD( datepart, count, datetime )

Returns a datetime produced by adding several date parts to a datetime. The datepart can be one of year, quarter, month, week, day, hour, minute, or second. For example, the following example adds two months, resulting in the value 2006-07-02 00:00:00.0:

DATEADD( month, 2, '2006/05/02' )
DATEPART( datepart, date )

Returns the value of part of a datetime value. The datepart can be one of year, quarter, month, week, day, dayofyear, weekday, hour, minute, or second. For example, the following example gets the month May as a number, resulting in the value 5:

DATEPART( month, '2006/05/02' )
DATETIME( string ) Converts a string value to a datetime. The string must have the format 'yyyy-mm-dd hh:nn:ss'.
LENGTH( string ) Returns the number of characters in a string.
SUBSTRING( string, start, length ) Returns a substring of a string. The start is the start position of the substring to return, in characters. The length is the length of the substring to return, in characters.
 Example