DATE(Mask)

From BR Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

DATE(mask) can be used as an INPUT FIELDS specification as of 4.3.

10 INPUT FIELDS “row, col, DATE(mask),UH” : date-variable

Special keyboard processing:

  • Punctuation (commas, colons, slashes, semicolons, and dashes) is skipped during entry, similar to PIC.
  • Insert and delete are supported within subfields that are delineated by punctuation.
  • Copy includes punctuation.
  • Cut is Copy with redisplay of zero date.
  • Paste causes BR to translate the date to DAYS format and then display the date. Excel and OpenOffice Calc application formats are supported.
  • If a string is pasted, it is first converted to DAYS using the provided mask.
  • If a zero DAYS value is displayed then Month, M3, Day and D3 mask positions contain dashes.

Date Picker

A date picker is available.

This configuration statement controls when the date picker appears:

DATE [ALWAYS]|[INVALID]|[NEVER]

ALWAYS show the picker whenever the cursor is in the field until a date is selected from the picker. Leaving the field and reentering it actives the picker again. Additionally, the optional leading attribute ^DATE_PICKER will do the same thing.

INVALID (the default) presents the date picker whenever the days value of the expressed date is zero.

NEVER will make the Date Picker never appear.

Also, the Date Picker appears when the cursor is in a DATE field and the user presses Ctrl-DownArrow (Note-the same key combination will open a Combo Box ).

Additionally, when in the date picker INPUT FIELDS, the following keys are active:

  • Shift- PgUp/PgDn – Go to the previous/next month
  • Ctrl- PgUp/PgDn – Go to the previous/next year



Sample Program

A sample program to demonstrate date entry is:

01000 ! Rep Date_Input
01020 ! Demonstrate The New Date() Input Format
01040 ! Skip Punctuation (Commas, Colons, Slashes, Semicolons, And Dashes)
01060 ! Insert And Delete Within Subfields That Are Delineated By Punctuation
01080 ! Continue To Support Cut And Paste Including Punctuation
01100 ! 
01120    rinput fields "5,10,DATE(mm/dd/yy) ;6,10,c": DATE_VAR
01140    print fields "8,10,date(Month DD, CCYY)": DATE_VAR
01160 ! 
01180    rinput fields "12,10,date(month dd, ccyy)": DATE_VAR
01200    if NOT DATE_VAR then goto 1180
01220    print fields "15,10,date(yy/mm/dd)": DATE_VAR 
01240    print fields "18,10,N 6": DATE_VAR  !Show days format