MetaData - Processing Rules - Date and Time Management

From All n One's bxp software Wixi

Revision as of 09:28, 19 July 2017 by Patrick Jenkins (talk | contribs) (Time)
Jump to: navigation, search

1 Overview

For more information on

Area Link
MetaData please refer here MetaData_-_Start_Here
Processing rules please refer here MetaData_Process_Rules
Parameter construction please refer here MetaData_Program_and_Outcomes

2 Reference

This wixi article is meant to serve as a reference guide to a subset of MetaData Processing Rules.


3 Rules

3.1 Date

The date rule allows for a field in the database to be formatted into universal date format i.e. YYY-MM-DD


Required fields to execute rule:

  1. Rule Name
  2. Form id (the same as the current sequence)
  3. Field to store the end result
  4. Form id (the same as the current sequence)
  5. Filed containing the date to format


Example:

Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Form Id[[-SEP-]] Date to format[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


Example (with replacement values):

Date[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


3.2 Date|Time

The date|time rule allows for a field in the database to be formatted into universal date time format i.e. YYY-MM-DD HH:MM:SS


Required fields to execute rule:

  1. Rule Name
  2. Form id (the same as the current sequence)
  3. Field to store the end result
  4. Form id (the same as the current sequence)
  5. Filed containing the date to format

Example:

Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Form Id[[-SEP-]] Date to format[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


Example (with replacement values):

DateTime [[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


3.3 Date|Time Now

The date|time now rule allows for a field in the database to be updated with the current date and time in universal date time format i.e. YYY-MM-DD HH:MM:SS


Required fields to execute rule:

  1. Rule Name
  2. Form id (the same as the current sequence)
  3. Field to store the end result


Example:

Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


Example (with replacement values):

DateTimeNow [[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


3.4 Report Time To Seconds

The report time to seconds rule converts a field in the database that contains a report time to a seconds value.


Required fields to execute rule:

  1. Rule Name
  2. Form id (the same as the current sequence)
  3. Field to store the end result
  4. Field containing the value to convert


Example:

Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Field containing the value to convert[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


Example (with replacement values):

ReportTimeToSeconds[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]] strCDA_1_field_0_2[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


3.5 Seconds To Report Time

The seconds to report time rule converts a field in the database that contains seconds to a report time.


Required fields to execute rule:

  1. Rule Name
  2. Form id (the same as the current sequence)
  3. Field to store the end result
  4. Field containing the value to convert


Example:

Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Field containing the value to convert[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


Example (with replacement values):

SecondsToReportTime[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]] strCDA_1_field_0_2[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


3.6 Time

The time rule allows for a field in the database to be formatted into universal time format i.e. HH:MM:SS


Required fields to execute rule:

  1. Rule Name
  2. Form id (the same as the current sequence)
  3. Field to store the end result
  4. Form id (the same as the current sequence)
  5. Filed containing the date to format


Example:

Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Form Id[[-SEP-]] Date to format[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


Example (with replacement values):

Time[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


3.7 Time To Seconds

The time to seconds rule allows for a field in the database to be converted from a time in the form HH:MM:SS to seconds


Required fields to execute rule:

  1. Rule Name
  2. Form id (the same as the current sequence)
  3. Field to store the end result
  4. Form id (the same as the current sequence)
  5. Filed containing the date to format


Example:

Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Form Id[[-SEP-]] Date to format[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


Example (with replacement values):

TimeToSeconds [[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


3.8 ZULU

The ZULU rule allows for a field in the database to be formatted into ZULU Date TIme format i.e. ZYYYY-MM-DDTHH:MM:SS


Required fields to execute rule:

  1. Rule Name
  2. Form id (the same as the current sequence)
  3. Field to store the end result
  4. Form id (the same as the current sequence)
  5. Filed containing the date to format


Example:

Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Form Id[[-SEP-]] Date to format[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


Example (with replacement values):

Date[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]

3.9 Day Between

The Days Between rule calculates the difference between a passed in date and now, it will return the number of days.


Required fields to execute rule:

  1. Rule Name
  2. Form id (the same as the current sequence)
  3. Field to store the end result
  4. Form id (the same as the current sequence)
  5. Filed containing the date check


Example:

Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Form Id[[-SEP-]] Date to check[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


Example (with replacement values):

DaysBetweenGivenAndNow [[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


3.10 Month To number

The month to number rule converts the text name of a month to the its numeric value.


Required fields to execute rule:

  1. Rule Name
  2. Form id (the same as the current sequence)
  3. Field to store the end result
  4. Form id (the same as the current sequence)
  5. Filed containing the month to convert


Example:

Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]]Form Id[[-SEP-]] Month to conver[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]


Example (with replacement values):

ConvertMonthTostrNumber[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]]1[[-SEP-]]strCDA_1_field_0_2[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]