Date & Time - Category for date and time manipulation ...
[Pages:9]Functions Sample
Date & Time - Category for date and time manipulation functions
Name
DATE
DATEFORMAT
DATERANGE DATEVALUE DAY DAYS
DAYSINMONTH DAYSINYEAR EDATE
HOUR ISLEAPYEAR MINUTE MONTH
Description
Return Type
Parameters
Name
Description
Creates a date object using the specified information on java.util.Date day, month and year.
Year Month
The year of the new date The month of the new date
Day of month
The day of the new date
Format the specified date object using the chosen format java.lang.String pattern.
Selected date Format pattern
The date to format Format pattern to apply when printing the date
Allows to create a JasperReports DateRange instance net.sf.jasperreports.types.d Date range details starting from either a String expression or a Date instance. ate.DateRange
Gives the corresponding numeric value (long milliseconds) java.lang.Long
for a specified date object.
Returns the day of a given date. Date object can be a
java.lang.Integer
String, long value (milliseconds) or Date instance itself.
Date object Selected date
Returns the number of days between two dates.
java.lang.Integer
Start date
The date range information The object representing the date The object representing the date The initial date
End date
The end date
Returns the number of days in a month.
java.lang.Integer
Selected date
The date to check
Returns the number of days in a year.
java.lang.Integer
Selected date
The date to check
Returns a date a number of months away.
java.util.Date
Selected date
The object representing the date
Months
The number of months after the given date
Returns the hour (0-23) of the day for a given date. Date object can be a String, long value (milliseconds) or Date instance itself. Checks if the given date occurs in a leap year.
java.lang.Integer java.lang.Boolean
Selected date Selected date
The object representing the date The date to check
Returns the minute (0-59) of the hour for a given date. Date object can be a String, long value (milliseconds) or Date instance itself. Returns the month of a given date. Date object can be a String, long value (milliseconds) or Date instance itself.
java.lang.Integer java.lang.Integer
Selected date Selected date
The object representing the date The object representing the date
Type java.lang.Integer java.lang.Integer java.lang.Integer java.util.Date java.lang.String java.lang.Object
Requir. Y Y Y Y Y Y
java.lang.Object
Y
java.lang.Object
Y
java.lang.Object
Y
java.lang.Object
Y
java.lang.Object
Y
java.lang.Object
Y
java.lang.Object
Y
java.lang.Integer
Y
java.lang.Object
Y
java.lang.Object
Y
java.lang.Object
Y
java.lang.Object
Y
Page 1 of 9
Date & Time - Category for date and time manipulation functions
Name
Description
Return Type
MONTHS
Returns the number of months between two dates.
java.lang.Integer
NETWORKDAYS
NOW SECOND TIME
Returns the number of working days between two dates (inclusive). Saturday and Sunday are not considered working days.
java.lang.Integer
Returns the current instant as date object
java.util.Date
Returns the second (0-59) of the minute for a given date. Date object can be a String, long value (milliseconds) or Date instance itself. Returns a text string representing a time value (hours, seconds and minutes). If no specific pattern is provided a default formatter is used.
java.lang.Integer java.lang.String
TODAY WEEKDAY
WEEKNUM WEEKS
Returns the current date as date object
java.util.Date
Returns the day of the week for a given date. Date object java.lang.Integer can be a String, long value (milliseconds) or Date instance itself.
Returns the week number of a given date.
java.lang.Integer
Returns the number of weeks between two dates.
java.lang.Integer
WEEKSINYEAR WORKDAY
YEAR YEARS
Returns the number of weeks in a year.
java.lang.Integer
Returns a date a number of workdays away. Saturday and java.util.Date Sundays are not considered working days.
Returns the year of a given date. Date object can be a String, long value (milliseconds) or Date instance itself.
Returns the number of years between two dates.
java.lang.Integer java.lang.Integer
Parameters Name Start date End date Start date End date
Description The initial date The end date The initial date The end date
Type java.lang.Object java.lang.Object java.lang.Object java.lang.Object
Requir. Y Y Y Y
Selected date
Hours Minutes Seconds Format pattern
The object representing the date
The hours for the new time value The minutes for the new time value The seconds for the new time value The pattern to format the time value
java.lang.Object
Y
java.lang.Integer
Y
java.lang.Integer
Y
java.lang.Integer
Y
java.lang.String
Selected date
The object representing the date
java.lang.Object
Y
Sunday is first day Boolean flag to decide if Sunday should be considered java.lang.Boolean
as first day. Default is not
Selected date
The date to check
java.lang.Object
Y
Start date
The initial date
java.lang.Object
Y
End date
The end date
java.lang.Object
Y
Selected date
The date to check
java.lang.Object
Y
Selected date
The object representing the date
java.lang.Object
Y
Working days
The number of days after the given date
java.lang.Integer
Y
Selected date
The object representing the date
java.lang.Object
Y
Start date End date
The initial date The end date
java.lang.Object
Y
java.lang.Object
Y
Page 2 of 9
Logical - Category for logical operations functions
Name
Description
Return Type
AND EQUALS
Returns true if all arguments are considered true, false otherwise.
Checks if the two specified objects are equal.
java.lang.Boolean java.lang.Boolean
FALSE IF
Returns the logical value FALSE.
java.lang.Boolean
Returns one of two values, depending on a test condition. java.lang.Object
NOT OR TRUE
Returns the negation of the specified boolean expression. java.lang.Boolean
Returns true if any of the arguments is considered true, false otherwise.
Returns the logical value TRUE.
java.lang.Boolean java.lang.Boolean
Parameters Name Argument Object 1 Object 2
Description A boolean expression or value The first element to be compared The second element to be compared
Test condition Value 1 (true) Value 2 (false) Argument Argument
An expression returning a boolean value The value returned when the test is true The value returned when the test is false A boolean expression or value A boolean expression or value
Type
Requir.
[Ljava.lang.Boolean; Y
java.lang.Object
Y
java.lang.Object
Y
java.lang.Boolean Y
java.lang.Object
Y
java.lang.Object
Y
java.lang.Boolean Y
[Ljava.lang.Boolean; Y
Page 3 of 9
Numeric / Mathematical - Category for mathematical operations functions
Name
Description
Return Type
ABS CEIL FACT FLOOR ISEVEN ISODD MAX MIN PRODUCT RAND RANDBETWEEN
SIGN SQRT SUM
Returns the absolute value of a number.
java.lang.Number
Returns the smallest value that is greater than or equal to java.lang.Double the argument and is equal to a mathematical integer.
Returns the factorial of a number.
java.lang.Long
Returns the largest value that is less than or equal to the java.lang.Double argument and is equal to a mathematical integer.
Checks if a number is even. If a non-integer number is java.lang.Boolean specified, any digits after the decimal point are ignored.
Checks if a number is odd. If a non-integer number is
java.lang.Boolean
specified, any digits after the decimal point are ignored.
Returns the maximum of a list of numeric values.
java.lang.Number
Returns the minimum of a list of numeric values.
java.lang.Number
Returns the product of a list of numbers.
java.lang.Number
Returns a random number between 0.0 and 1.0.
java.lang.Double
Returns an Integer random number between bottom and java.lang.Integer top range (both inclusive).
Returns the sign of a number.
java.lang.Integer
Returns the positive square root of a number. The number java.lang.Number must be positive.
Returns the sum of a list of numbers.
java.lang.Number
Parameters Name Number Number
Integer number Number
Number
Number
Number Number Number
Description The number to check Value The argument Value The number to check The number to check Number to compare Number to compare Argument
Bottom range Top range Number Positive number Number
Integer number for the bottom range Integer number for the top range The number to check Argument Addendum
Type java.lang.Number java.lang.Number
Requir. Y Y
java.lang.Integer
Y
java.lang.Number Y
java.lang.Number Y
java.lang.Number Y
[Ljava.lang.Number; Y [Ljava.lang.Number; Y [Ljava.lang.Number; Y
java.lang.Integer
Y
java.lang.Integer
Y
java.lang.Number Y
java.lang.Number Y
[Ljava.lang.Number; Y
Page 4 of 9
Text - Category for text/string manipulation functions
Name
Description
Return Type
BASE
Returns a text representation of a number, in a specified java.lang.String base radix.
CHAR CLEAN CODE CONCATENATE DOUBLE_VALUE EXACT
FIND
Returns a single text character, given a character code. java.lang.String
Returns a new text string without non-printable characters. java.lang.String
Returns the numeric code (0-255) for the first character in java.lang.Integer
a string.
Combines a list of strings into a single one.
java.lang.String
Returns a Double number representing the given text string.
Returns TRUE if the two text specified are exactly the same (case sensitive compare).
java.lang.Double java.lang.Boolean
Returns the character position of a string inside another java.lang.Integer text. If the text is not found then -1 is returned.
FIXED
Returns the text representing number with the specified java.lang.String decimal places.
FLOAT_VALUE INTEGER_VALUE LEFT
Returns a Float number representing the given text string. java.lang.Float
Returns an Integer number representing the given text string.
Returns the specified number of characters (1 by default) from the left side of the input text.
java.lang.Integer java.lang.String
LEN LONG_VALUE
Returns the length of the specified text string.
java.lang.Integer
Returns a Long number representing the given text string. java.lang.Long
Parameters Name Number Radix Minimum length
Description The positive integer number to convert The base radix, an integer between 2 and 36
Type java.lang.Integer java.lang.Integer java.lang.Integer
Requir. Y Y
Char code Text Text Text Number (as text) Text 1 Text 2 Find text Text to search Start position Number Decimals Omit separators Number (as text) Number (as text) Text Characters num Text Number (as text)
The character code, in the range 1-255
java.lang.Integer
Y
The text to be cleaned
java.lang.String
Y
The string containing the character to convert
java.lang.String
Y
Argument
[Ljava.lang.String; Y
The input text string representing a number
java.lang.String
Y
The first text to compare
java.lang.String
Y
The second text to compare
java.lang.String
Y
The text to look into
java.lang.String
Y
The text string to search
java.lang.String
Y
The position from which the search should start
java.lang.Integer
The number to print out
java.lang.Number Y
The number of decimal places
java.lang.Integer
Y
The flag to specify if the thousands separators should java.lang.Boolean
be included or not
The input text string representing a number
java.lang.String
Y
The input text string representing a number
java.lang.String
Y
The input text
java.lang.String
Y
The number of characters. Default (not specified) is 1 java.lang.Integer
The input text string
java.lang.String
Y
The input text string representing a number
java.lang.String
Y
Page 5 of 9
Text - Category for text/string manipulation functions
Name LOWER LTRIM MID
PROPER REPLACE
REPT RIGHT RTRIM SEARCH
SUBSTITUTE
T
Description
Return Type
Performs the lower case conversion of the specified text string.
Clear a string, removing leading whitespaces.
java.lang.String java.lang.String
Returns the text from the middle of a text string.
java.lang.String
Capitalizes each words of the specified text. The remaining java.lang.String parts of words are in lowercase.
Replaces parts of a text string with a different one. Starting java.lang.String from a specified position, removes a certain number of characters and then insert the new text.
Replicates an input text string for a specified number of java.lang.String times.
Returns the specified number of characters (1 by default) java.lang.String from the right side of the input text.
Clear a string, removing trailing whitespaces.
Returns the position of a string of text in another string. Search is not case-sensitive.
java.lang.String java.lang.Integer
Substitutes new text for old text in a text string. When no java.lang.String occurrence is specified all occurrences are replaced.
Returns the text string if the value is a string, otherwise an java.lang.String empty string is returned.
Parameters Name Text Text Text Start Characters num Text Original Text Start position Characters num New Text Original Text Number of copies Text Characters num Text Find Text Text to search Start position Original Text Old Text New Text Occurrence Generic value
Page 6 of 9
Description
Type
The input text string
java.lang.String
The text string to be trimmed
java.lang.String
The input text
java.lang.String
The initial position to extract the text
java.lang.Integer
The number of characters
java.lang.Integer
The input text
java.lang.String
The input text to modify
java.lang.String
The number of characters. Default (not specified) is 1 java.lang.Integer
The number of characters to remove
java.lang.Integer
The text that will replace the old one
java.lang.String
The input text to replicate
java.lang.String
The needed number of copies
java.lang.Integer
The input text
java.lang.String
The number of characters. Default (not specified) is 1 java.lang.Integer
The text string to be trimmed
java.lang.String
The text to find
java.lang.String
The text to look into
java.lang.String
The initial position
java.lang.Integer
The text to be modified
java.lang.String
The old text to be replaced
java.lang.String
The new text that will replace the old one
java.lang.String
The occurrence of old text to be replaced
java.lang.Integer
The object value to be tested
java.lang.Object
Requir. Y Y Y Y
Y Y Y Y Y Y Y Y
Y Y Y
Y Y Y
Y
Text - Category for text/string manipulation functions
Name
Description
Return Type
TEXT
Converts a number into a text string according to a specified format.
java.lang.String
TRIM
Clear a string,removing leading and trailing whitespaces. java.lang.String
UPPER
Performs the upper case conversion of the specified text java.lang.String string.
Functions Examples
Numeric / Mathematical Functions
| -245 | is even 14.4 * 22.56 * 10 * 34 Random number between 0 and 1000 Factorial of 5 SQRT(6.25) Max value in [4,6,2,3,9,4,1,7,3,8]
Expression
ISEVEN(ABS(-245)) PRODUCT(14.4, 22.56, 10, 34) 1000 * RAND() FACT(5) SQRT(6.25) MAX(4, 6, 2, 3, 9, 4, 1, 7, 3, 8)
Parameters Name Number Format Text Text
Description The number to be formatted The format pattern The text string to be trimmed The input text string
Result
false 110.453,76 171,592 120 2,50 9
Type java.lang.Number java.lang.String java.lang.String java.lang.String
Requir. Y Y Y Y
Page 7 of 9
Date & Time Functions
Current date Current year Four months later Five years ago Current week number Next working day Years since 2000 Current time
Text Functions
Concatenate "Hello", " ", "World" Case sensitive search for "ll' in "Hello" Case insensitive search for "LL" in "all" Lower case for "Hello WORLD" Capitalize each word Replicates "Hello " three times Substitute "o" by "0" in "Hello World" Extract "orl" from "Hello World"
Expression
DATEFORMAT(NOW(), "EEEE, MMM d, yyyy") YEAR(TODAY()) DATEFORMAT(EDATE(TODAY(), 4), "MM/dd/yyyy") DATEFORMAT(EDATE(TODAY(), -60), "MMMM d, yyyy") WEEKNUM(TODAY()) DATEFORMAT(WORKDAY(TODAY(),1), "EEE, MMM dd") YEARS(DATE(2000, 1, 1), NOW()) DATEFORMAT(TODAY(), "hh:mm:ss a")
Expression
CONCATENATE("Hello", " ", "World") "Found on position " + (FIND("Hello", "ll") + 1) "Found on position " + (SEARCH("LL", "all") + 1) LOWER("Hello WORLD") PROPER("Capitalize each word") REPT("Hello ", 3) SUBSTITUTE("Hello World", "o", "0") MID("Hello World", 8, 3)
Result
luni, Mai 25, 2015 2015 09/25/2015 mai 25, 2010 22 Ma, Mai 26 15 03:54:47 PM
Result
Hello World Found on position 3 Found on position 2 hello world Capitalize Each Word Hello Hello Hello Hell0 W0rld orl
Page 8 of 9
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- volume serial numbers and format verification datetime
- dates and times with lubridate cheat sheet
- handling date times in r vanderbilt university
- working with sas date and time functions
- working with time in crimson
- guidance on coding and billing date of service on
- date time category for date and time manipulation
- new medicare beneficiary identifier mbi get it use it