KNTA_USER_UTIL Functions
The KNTA_USER_UTIL package includes the following functions:
-
KNTA_USER_UTIL.to_char(user, option, dateObject)
This function converts a date object to a String according to the specified user's regional settings.
The return type is string.
This function takes the three parameters listed in the following table:
Parameter
Type
Description
user
String
Current user. For example,
[SYS.USERNAME]
option
String
Date format option.
Valid values:
LONG
,MEDIUM
,SHORT
dateObject
Date (Oracle date object)
Result of
KNTA_USER_UTIL.to_date
andKNTA_USER_UTIL.next_date
, or result of Oracle built-in functions likesysdate
,to_date()
,add_months()
, and so on. -
KNTA_USER_UTIL.to_date(user, option, dateString)
This function converts a date string to an Oracle date object according to the specified user's regional setting.
The return type is Oracle date object.
This function takes the three parameters listed in the following table:
Parameter
Type
Description
user
String
Current user. For example,
[SYS.USERNAME]
option
String
Date format option.
Valid values:
LONG
,MEDIUM
,SHORT
dateString
String (of a specific date format)
Date string of the specified user's default date format. Use
[REQD.VP.FIELDNAME]
of a date field for this parameter.Note: Date Time and Time validation fields are not supported.
-
KNTA_USER_UTIL.next_date(user, option, dateString, dateGap)
This function coverts a date String to an Oracle date object according to the specified user's regional setting. Users can change the date to another using a date gap.
The return type is Oracle date object.
This function takes the four parameters listed in the following table:
Parameter
Type
Description
user
String
Current user. For example,
[SYS.USERNAME]
option
String
Date format option.
Valid values:
LONG
,MEDIUM
,SHORT
dateString
String (of a specific date format)
Date string of the specified user's default date format. Use
[REQD.VP.FIELDNAME]
of a date field for this parameter.Note: Date Time and Time validation fields are not supported.
dateGap
Integer
Set the date to several days after if the
dateGap
value is a positive integer, or several days before if thedateGap
value is a negative integer. -
KNTA_USER_UTIL.tonumber(string)
This function fetches and converts a String to a Number in English format (with comma `
,
' as thousandths separator and dot `.
' as decimal separator). For example,12,123,123.12
.Apart from not taking session NLS into account, this function is similar to the system function
to_number
.The return type is number.
This function takes one parameter as described below:
Parameter
Type
Description
string
String (of a value)
A string of value.