Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Formula

Description

Usage

Result

datediff

units

·        "y" years
1 year = 365.2425 days

·        "M" months
1 month = 30.44 days

·        "d" days

·        "h" hours

·        "m" minutes

·        "s" seconds

 

dateformat

·        "ymd" Y-M-D (default)

·        "mdy" M-D-Y

·        "dmy" D-M-Y 

 

returnsSignedValue

·       boolean parameter (true/false) as to whether return the signed value or the positive value

 

useLocalTime

·       boolean parameter (true/false) as to whether the parameter Times should be adjusted from UTC to local time of the device

datediff(
date1,
date2,
units,
dateformat*,
returnSignedValue,
useLocalTime*
)

·        includes optional parameters

 

Example without optional parameters:

 

datediff([fieldname1], [fieldname2], “h”, true)

the difference in ‘units’ between date1 and date2

 

 

 

 

 

 

 

 

the difference in “hours”  between fieldname1 and fieldname2

returns as positive or negative value

dateFormat

The date format is used to display date time in desired format.

First parameter is the date and or time value that needs to be formatted.

Second parameter is used to specify the format in which information is to be presented.

Additionally, when the PI does not want to display UTC Time on date or time picker questions, an additional parameter can be utilized to control presentation of information.

  • Using the parameter of false will preserve PT’s local time, to display the time as PT entered it.

.

$dateFormat([fieldname],'MM/dd/yyyy', false)$

$dateFormat([fieldname], 'hh:mm tt', false)$

$dateFormat([fieldname], 'h:mm tt', false)$

Shows the current date

Shows the current time not in UTC time in the format below.

Example: 09:00 pm

Shows the current time not in UTC time in the format below.

Example: 9:00 pm

...