Personal tools

Log in

Changes

From All n One's bxp software Wixi

Jump to: navigation, search

MetaData - Processing Rules - Date and Time Management

9,388 bytes added, 22:27, 7 February 2017
Created page with "= Overview = For more information on {| class="wikitable" ! Area ! Link |- | MetaData please refer here || MetaData_-_Start_Here |- | Processing rules please refer here..."
= Overview =

For more information on

{| class="wikitable"
! 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]]
|-
|}

= Reference =

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


= Rules =


== 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:
# Rule Name
# Form id (the same as the current sequence)
# Field to store the end result
# Form id (the same as the current sequence)
# Filed containing the date to format


Example:
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>


Example (with replacement values):
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>



== 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:
# Rule Name
# Form id (the same as the current sequence)
# Field to store the end result
# Form id (the same as the current sequence)
# Filed containing the date to format

Example:
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>


Example (with replacement values):
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>



== 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:
# Rule Name
# Form id (the same as the current sequence)
# Field to store the end result


Example:
<syntaxhighlight lang="xml">
Rule Name[[-SEP-]]Form Id[[-SEP-]]Destination field[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
</syntaxhighlight>


Example (with replacement values):
<syntaxhighlight lang="xml">
DateTimeNow [[-SEP-]]1[[-SEP-]]strCDA_1_field_0_1[[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]][[-SEP-]]
</syntaxhighlight>



== 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:
# Rule Name
# Form id (the same as the current sequence)
# Field to store the end result
# Field containing the value to convert


Example:
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>


Example (with replacement values):
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>



== 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:
# Rule Name
# Form id (the same as the current sequence)
# Field to store the end result
# Field containing the value to convert


Example:
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>


Example (with replacement values):
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>



== 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:
# Rule Name
# Form id (the same as the current sequence)
# Field to store the end result
# Form id (the same as the current sequence)
# Filed containing the date to format


Example:
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>


Example (with replacement values):
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>



== 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:
# Rule Name
# Form id (the same as the current sequence)
# Field to store the end result
# Form id (the same as the current sequence)
# Filed containing the date to format


Example:
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>


Example (with replacement values):
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>



== 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:
# Rule Name
# Form id (the same as the current sequence)
# Field to store the end result
# Form id (the same as the current sequence)
# Filed containing the date to format


Example:
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>


Example (with replacement values):
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>



== 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:
# Rule Name
# Form id (the same as the current sequence)
# Field to store the end result
# Form id (the same as the current sequence)
# Filed containing the date check


Example:
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>


Example (with replacement values):
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>



== 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:
# Rule Name
# Form id (the same as the current sequence)
# Field to store the end result
# Form id (the same as the current sequence)
# Filed containing the month to convert


Example:
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>


Example (with replacement values):
<syntaxhighlight lang="xml">
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-]]
</syntaxhighlight>




[[Category:Topic:MetaData]]
[[Category:Module Specific:MetaData]]
7,528
edits