In Sequel, the format of date fields, dates created with the CVTDATE function, and Date variables are dependent on where the data is viewed and where the request is run. This document explains the rules for determining how, and from where, the date format is derived, as well as how date styles vary between Viewpoint,  the host version of Sequel (green screen), and the Sequel Web Interface (browser).

Saved with View Attributes

  • Date Style (DTSTYLE) parameter is initially determined from the Sequel Defaults.
  • DTSTYLE can be changed in view’s properties/attributes.
  • DTSTYLE of remote database and *LOCALSYS views (type SQLVIEWM) will always be *ISO.


Job Attributes of Submitted Jobs and Green Screen Interactive Jobs

Commands that produce output (PRINT/BCHPRINT, EXECUTE/BCHEXECUTE, REPORT/BCHREPORT) have a DTSTYLE parameter that determines the date style.

  • PRINT/BCHPRINT and DISPLAY default to *JOB.
  • EXECUTE/BCHEXECUTE default to *FIELD.
  • REPORT/BCHREPORT default to *JOB.


In the Viewpoint job QZRCSRVS

In Viewpoint, the DTSTYLE of the i5 Viewpoint job, QZRCSRVS, is changed to match the PC Client’s Regional Settings. The job becomes *MDY for both mm/dd/yy and mm/dd/yyyy.

  • Results from a view or table will display based on PC’s regional setting.
  • Date fields used in a REPORT will use the date style from the view’s properties.
  • Date variables (run-time prompts) use the DTSTYLE from the view properties.
  • Date variable prompts from a script use the format from the User Defaults.


In the Sequel Web Interface Classic (Data Binding = A or N)

  • Results from a view or table will use the date style from the view’s properties.
  • Date fields used in a REPORT will use the date style from the from the view’s properties.
  • Date variables (run-time prompts) from objects besides scripts use the DTSTYLE from the view properties.
  • Date variable prompts from a script use the format from the User Defaults.
  • Results from a view or table run in a script will use the format from the User Defaults.
  • Date fields used in a REPORT, and run in a script, will use the format from the User Defaults.


In the Sequel Web Interface Explorer

  • All views, table views, reports and scripts containing a date variable prompt as *USA.
  • Date field results from prompted views, table views, reports and scripts display as *MDY except a Report using a prompted view which displays in the format specified by the date style defined in the view.
  • Date field results from non-prompted views, table views, reports and scripts display as *MDY.


User Defaults (SETDFT)

  • The DTSTYLE specified in a user’s default controls the date style during the creation of new views.
  • Date variable prompts from a script use the format from the User Defaults (except when run from the Sequel Web Interface).


Script Considerations

  • Scripts do not have a date style parameter so a date format is not saved with the script.
  • The DTSTYLE parameter of a Sequel command is ignored in a script when run from a browser.
  • If the command in the script specifies a DTSTYLE, the script contains date variables, and the script is going to be submitted from VP, the DTSTYLE parameter on the command must match the DTSTYLE of the User Defaults for the user submitting the request.


UPDATE, INSERT, and DELETE Command Considerations

  • The default DTSTYLE value for each of the commands is *JOB.
  • When updating a column with a date data type, the value passed via the SET parameter must conform to the style indicated by the DTSTYLE parameter of the UPDATE command.
  • When inserting a record with a date type field, the date value provided by the VALUE parameter must conform to the style indicated by the DTSTYLE parameter of the INSERT command.
  • The DTSTYLE parameter value must be considered when entering a date expression into the SQL parameter of any of these commands.

  


Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: April 21, 2017