|
| Date Functions : | Function Index |
Function
Description:
To retrieve the date value that is
obtained by adding or subtracting the number of days (given in the
Offset value) to the current date.
How
to Define:
result = adjustDate("Format", "Offset")
Format =
MM/dd/yyyy or MM/dd/yy.
Offset =
Integer value to add or subtract from the current date.
Example:
result=adjustDate("MM/dd/yyyy","-3")
displayMessage(result)
Return Value:
String
Function
Description:
To retrieve the date value that is
obtained by adding or subtracting the number of days (given in the
offset value) to the given date.
How
to Define:
result
= adjustGivenDate("Indate",
"Offset")
Indate = Specify a date in MM/dd/yyyy.
Offset =
Integer value to add or subtract from the given date.
Example:
result=adjustGivenDate("04/05/2006","2")
displayMessage(result)
Return Value:
String
Function
Description:
To get the difference between the
given
from date and to date.
How
to Define:
result = getDateDiff(fromDate,toDate)
fromDate = Specify a from date in MM/DD/YYYY format.
toDate = Specify a to date in MM/DD/YYYY
format.
Example:
result = getDateDiff("05/02/2006","05/04/2006")
displayMessage(result)
Return Values:
Integer
Function
Description:
To retrieve the current date in
string
format.
How
to Define:
result = getDateStr()
No arguments
Example:
result = getDateStr()
displayMessage(result)
Return Value:
String
Function
Description:
To retrieve the current date and
time in
string format.
How to Define:
result = getDateTime()
No arguments
Example:
result = getDateTime()
displayMessage(result)
Return Value:
String
Function
Description:
To retrieve the desired part of the
current date or time.
How to Define:
result = getDateTimePart("<DESIRED_PART_OF_DATE_OR_TIME>")
"<DESIRED_PART_OF_DATE_OR_TIME>" = YEAR, MONTH, DAY,
DAY_OF_MONTH, DAY_OF_WEEK, HOUR, MINUTE, SECOND, MILLISECOND.
Example:
result = getDateTimePart("YEAR")
displayMessage(result)
Return Value:
Integer
Function
Description:
To retrieve the current week day.
How to Define:
result = getDay()
No arguments
Example:
result = getDay()
displayMessage(result)
Return Value:
String
Function
Description:
To retrieve the current hour.
How to Define:
result = getHour()
No arguments
Example:
result = getHour()
displayMessage(result)
Return Value:
String
Function
Description:
To retrieve the next week day from the current date.
How
to Define:
result =getNextDay()
Example:
result =getNextDay()
displayMessage(result)
Return Value:
String
Function
Description:
To retrieve the next hour from the
current time.
How
to Define:
result =getNextHour()
Example:
result =getNextHour()
displayMessage(result)
Return Values:
String
Function
Description:
To retrieve the previous week day
from
the current date.
How
to Define:
result =getPreviousDay()
Example:
result =getPreviousDay()
displayMessage(result)
Return Values:
String
Function
Description:
To retrieve the previous hour from
the
current time.
How to Define:
result =getPreviousHour()
Example:
result =getPreviousHour()
displayMessage(result)
Return Values:
String
Function
Description:
To retrieve the current time in
long
format.
How to Define:
result =getTimeLong()
Example:
result =getTimeLong()
displayMessage(result)
Return Values:
Long
Function
Description:
To retrieve the current time in
string
format.
How to Define:
result =getTimeStr()
Example:
result =getTimeStr)
displayMessage(result)
Return Values:
String
|