APIdia Launch Partner
Top Fields Constructors Methods
net.ucanaccess.converters

public final Class Functions

extends Object
Class Inheritance
Static Imports
net.ucanaccess.converters.RegionalSettings.getRegionalSettings

Field Summary

Modifier and TypeField and Description
private static final LocalDateTime
ACCESS_BASE_DATE

Day zero of Access date values.

private static final double
private static final String
private static Double
private static final System.Logger
private static SecureRandom
private static Double
private static final WeekFields
WEEK_FIELDS_SUNDAY_START

Weeks as in Access by default: starting on Sunday, week 1 contains January 1st.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Integer

Returns:

character code
asc
(String
any valid string expression
s
)

Returns an Integer representing the character code corresponding to the first letter in a string.

public static double

Returns:

arctangent
atn
(double
a double or any valid numeric expression.
number
)

Returns a double specifying the arctangent of a number.

public static boolean
public static boolean

Returns:

boolean
cbool
(Boolean
boolean input
value
)

Converts a value to a boolean.

public static boolean
cbool(String value)

private static boolean
public static BigDecimal
ccur(BigDecimal value)

Converts an expression into a currency value.

public static Timestamp
cdate(String dt)

Converts an expression into a date value.

public static Double
cdbl(Double number)

Converts an expression to a double.

public static Double
cdec(Double number)

public static Short
cint(Double number)

public static Short
cint(boolean bool)

public static Integer
clng(Double value)

Converts an expression to a long integer.

public static Integer
clng(String value)

public static Integer
clng(Integer value)

public static Integer
clong(Double value)

public static Integer
clong(Integer value)

public static Integer
clong(boolean value)

public static Boolean
contains(Object obj1, Object obj2)

pack-priv static SimpleDateFormat
public static double
csign(double value)

public static String
cstr(Boolean value)

Converts a value to a string.

public static String
cstr(String value)

public static String
cstr(double value)

public static String
cstr(int value)

public static String
cstr(Timestamp value)

private static String
public static String
cvar(Double value)

public static Timestamp
date()

Returns the current system date.

public static Date

Returns:

calculated date
dateAdd
(String
interval of time
intv
,
int
number of intervals to add (to get dates in the future) or dedcut (to get dates in the past)
vl
,
Date
date to which the interval is added
dt
)

Returns a date containing a date to which a specified time interval has been added.

public static Timestamp
dateAdd(String intv, int vl, Timestamp dt)

public static Timestamp
dateAdd(String intv, int vl, String dt)

public static Integer
dateDiff(String intv, String dt1, String dt2)

public static Integer
dateDiff(String intv, String dt1, Timestamp dt2)

public static Integer
dateDiff(String intv, Timestamp dt1, String dt2)

public static Integer
public static Integer
datePart(String intv, String dt, Integer firstDayOfWeek)

public static Integer

Returns:

date part
datePart
(String
interval of time you want to return
interval
,
Timestamp
value that you want to evaluate
date
,
Integer
constant that specifies the first day of the week
firstDayOfWeek
)

Returns an integer containing the specified part of a given date.

public static Integer
datePart(String intv, String dt, Integer firstDayOfWeek, Integer firstWeekOfYear)

public static Integer
datePart(String intv, Timestamp dt, Integer firstDayOfWeek, Integer firstWeekOfYear)

public static Integer
public static Integer
public static Timestamp

Returns:

date
dateSerial
(int
number between 100 and 9999, inclusive, or a numeric expression
year
,
int
any numeric expression
month
,
int
any numeric expression
day
)

Returns a date for a specified year, month, and day.

public static Timestamp
private static Timestamp
dateValue(String dt, boolean onlyDate)

public static Timestamp
dateValue(Timestamp dt)

Returns a date based on a string.

private static int
public static double
ddb(double cost, double salvage, double life, double period)

public static double
ddb(double cost, double salvage, double life, double period, double factor)

public static Boolean
equals(Object obj1, Object obj2)

public static Boolean
public static Double

Returns:

integer portion
fix
(Double
a double or any valid numeric expression, if null, null is returned
number
)

Returns the integer portion of a number.

public static String
public static String
public static String
format(String s, String par, boolean incl)

public static String
private static String
public static Boolean
public static Boolean
public static Boolean
public static Boolean
public static Timestamp
public static Timestamp
formulaToDate(String res, String datatype)

public static Timestamp
formulaToDate(Boolean res, String datatype)

public static Timestamp
formulaToDate(Double res, String datatype)

public static Double
public static Double
public static Double
formulaToNumeric(String input, String datatype)

public static Double
public static String
formulaToText(String res, String datatype)

public static String
formulaToText(Double res, String datatype)

public static String
formulaToText(Boolean res, String datatype)

public static String
public static double
fv(double rate, int periods, double payment)

public static double
fv(double rate, int periods, double payment, double pv)

public static double
fv(double rate, int periods, double payment, double pv, double type)

public static String
iif(Boolean b, String o1, String o2)

Returns one of two parts, depending on the evaluation of an expression.

public static Integer
public static Double
iif(Boolean b, Double o1, Double o2)

public static Boolean
public static Timestamp
private static <T> T
iifImpl(Boolean b, T o1, T o2)

public static Integer
instr(Integer start, String text, String search)

Returns the position of the first occurrence of a string in another string.

public static Integer
instr(Integer start, String text, String search, Integer compare)

public static Integer
instr(String text, String search)

public static Integer
instr(String text, String search, Integer compare)

public static Integer
instrrev(String text, String search)

Returns the position of the first occurrence of a string in another string, starting from the end of the string.

public static Integer
instrrev(String text, String search, Integer start)

public static Integer
instrrev(String text, String search, Integer start, Integer compare)

public static double
ipmt(double rate, double per, double nper, double pv)

public static double
ipmt(double rate, double per, double nper, double pv, double fv)

public static double
ipmt(double rate, double per, double nper, double pv, double fv, double type)

public static boolean
isDate(String value)

Returns true if the expression is a valid date, otherwise false.

public static boolean
public static boolean
isNull(String value)

Returns true if the expression is a null value, otherwise false.

public static boolean
public static boolean
isNull(Double value)

public static boolean
isNumeric(BigDecimal b)

Returns true if the expression is a valid number, otherwise false.

public static boolean
private static int
lceil(double d)

public static String
left(String input, int i)

Extracts a substring from a string, starting from the left-most character.

public static String
leftS(String input, int i)

public static Integer
len(String value)

Returns the length of the specified string.

private static int
lfloor(double d)

private static int
lrint(double d)

public static String
mid(String value, int start)

Extracts a substring from a string (starting at any position).

public static String
mid(String value, int start, int length)

public static Integer
mint(Double value)

Returns the integer portion of a number.

public static Short
mint(boolean value)

public static String
monthName(int number)

Returns a string representing the month given a number from 1 to 12.

public static String
monthName(int number, boolean abbreviate)

public static Timestamp
now()

Returns the current system date and time.

public static double
nper(double rate, double pmt, double pv)

public static double
nper(double rate, double pmt, double pv, double fv)

public static double
nper(double rate, double pmt, double pv, double fv, double type)

public static String
nz(String value)

Returns the second argument if the first argument is null.

public static Double
nz(Double value)

public static Integer
nz(Integer value)

public static BigDecimal
nz(BigDecimal value)

public static String
nz(String value, String other)

public static BigDecimal
nz(BigDecimal value, BigDecimal other)

public static Double
nz(Double value, Double other)

public static Integer
nz(Integer value, Integer other)

private static Object
nz(Object value, Object other)

public static String
private static String
padLeft(int value, int n)

private static String
padLeft(String value, int n)

public static String
partition(Double number, double start, double stop, double interval)

public static double
pmt(double rate, double periods, double pv)

public static double
pmt(double rate, double periods, double pv, double fv)

public static double
pmt(double rate, double periods, double pv, double fv, double type)

public static double
ppmt(double rate, int per, int nper, double pv)

public static double
ppmt(double rate, int per, int nper, double pv, double fv)

public static double
ppmt(double rate, int per, int nper, double pv, double fv, double type)

public static double
pv(double rate, double nper, double pmt)

public static double
pv(double rate, double nper, double pmt, double fv)

public static double
pv(double rate, double nper, double pmt, double fv, double type)

public static double
rate(double nper, double pmt, double pv)

public static double
rate(double nper, double pmt, double pv, double fv)

public static double
rate(double nper, double pmt, double pv, double fv, double type)

public static double
rate(double nper, double pmt, double pv, double fv, double type, double guess)

public static String
right(String input, int i)

Extracts a substring from a string starting from the right-most character.

public static String
rightS(String input, int i)

public static Double
rnd()

Generates a random number (integer value).

public static Double
public static double
round(double d, double p)

Returns a number rounded to a specified number of decimal places.

public static short
sgn(double n)

Returns the sign of a number.

public static short
sign(double n)

public static double
sln(double cost, double salvage, double life)

public static String
space(Integer nr)

Returns a string with a specified number of spaces.

public static double

Returns:

square root
sqr
(double
a double greater than or equal to zero
number
)

Returns a double specifying the square root of a number.

public static String
str(double d)

Returns a string representation of a number.

public static Integer
strComp(String value1, String value2, Integer type)

Returns an integer value representing the result of a string comparison.

public static Integer
strComp(String value1, String value2)

public static String
strConv(String value, int conversion)

Returns a string converted as specified.

public static String
string(Integer nr, String str)

Returns a Variant (String) containing a repeating character string of the length specified.

public static String
strReverse(String value)

Returns a string whose characters are in reverse order.

public static double
syd(double cost, double salvage, double life, double per)

public static Timestamp
time()

Returns the current system time.

public static Timestamp
timeSerial(Integer h, Integer m, Integer s)

Returns a time given an hour, minute, and second value.

public static Timestamp
private static LocalDateTime
toLocalDateTime(Date dt)

Converts a date to local date and time.

public static Double
val(String val1)

Accepts a string as input and returns the numbers found in that string.

public static Double
private static Double
val(Object val1)

public static Integer
weekDay(Timestamp date)

Returns a number representing the day of the week (a number from 1 to 7) given a date value.

public static Integer
weekDay(Timestamp date, Integer firstDayOfWeek)

public static String
weekdayName(int number)

Returns a string representing the day of the week given a number from 1 to 7.

public static String
weekdayName(int number, boolean abbreviate)

public static String
weekdayName(int num, boolean abbreviate, int firstDayOfWeek)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait