Transcript
Page 1: AppEngine Date and Time Functions

Application Engine

Meta-SQL: Date and Time Functions Meta-SQL Description %CurrentDateIn Expands to a platform-specific SQL substring

representing the current date in the WHERE clause of a SQL SELECT or UPDATE statement, or when the current date is passed in an INSERT statement.

%CurrentDateOut Expands to platform-specific SQL for the current date in the SELECT clause of an SQL query.

%DateIn(dt) Where dt is either a Date value or a date literal in YYYY-MM-DD format, expands into platform-specific SQL syntax for the date. %DateIn should be used whenever a date literal or Date bind variable is used in a comparison in the WHERE clause of a SELECT or UPDATE statement.

%DateOut(dt) Where dt is a date column, causes dt to be converted from its platform-specific format to PeopleSoft format when the value is received from the database server.

%DateTimeIn(dtt) Expands to platform-specific SQL for a DateTime value being sent to the database server. The parameter dtt is either a DateTime bind variable or a string literal in the form: MM/DD/YY[YY] hh:mm:ss.ssssss [{AM|PM}]

%DateTimeOut(datetime_col) Where datetime_col is a DateTime column, causes datetime_col to be converted from its platform-specific format to PeopleSoft format when the value is received from the database server.

%TimeIn(tm) Expands to platform-specific SQL for a DateTime value being sent to the database server. The parameter tm is either a Time bind variable or a string literal in the form: hh:mm:ss.ssssss [{AM|PM}]

%TimeOut(tm) Where time_col is a time column, causes time_col to be converted from its platform-specific format to PeopleSoft format when the value is received from the database server.

Note: You can avoid confusion when using meta-SQL such as %DateIn

and %DateOut if you keep in mind that “in” and “out” are relative to the DBMS, not to the client buffer.

Top Related