You are here: MONITOR Basics > General Functions and Methods > Managing Date and Period

Managing Date and Period

In MONITOR you can enter date and period in different formats in the different occurring date fields. In certain fields you always enter the date but in certain other fields you can enter a period of time, for example a week. This is selected with the Date format for periods setting under the System tab in the Settings procedure in the Global Settings module.

You can divide the date and period formats into three different groups:

1. ClosedDate format in the main image in registering procedures

In these date fields you always enter the date according to the established date format. For example 15-08-01, 2015-08-01, 15/08/01, 2015.08.01, etc.

2. ClosedPeriod formats occurring in e.g. order rows and invoice rows

You can enter different formats in the period fields on the rows in these procedures. You can enter the format according to the standard for dates under Regional Options in the Control Panel in Windows, or according to the format selected under the Period formats heading in the System tab in the Settings procedure.

The entered period format or date format will be saved in the rows. The saved date format will be used for printouts. However, for manufacturing order rows the period format selected in the Settings procedure will always be used. In this way the manufacturing order rows differ from rows in other procedures. This is due to the fact that a manufacturing order is an internal order. Also see the section Samples of Date Format Use for Customer Orders.

In your MONITOR database, the date is always saved in the format you have selected for Period format in the Settings procedure in the Global Settings module. Those formats are: Format 1 (YYWW = Year Year Week Week) Format 2 (YYWWD = Year Year Week Week Day) or Format 3 (from Date/Time in the Control Panel).

Validation on Rows

Below you will find examples of approved date formats for e.g. order rows:

1508
15081
150801
8/1/2015
8/1/2015

Here are some examples of invalid date formats:

20150801
15088
15089
1500
1554
150230, 150431
15-08
15-
15
151
15080

If you use the format YYWW the system will always add day 1 to save in the date format.

ClosedSamples of Date Format Use for Customer Orders

  1. Suppose that you have selected Format 2 for Date format for periods in the Settings procedure.
  2. You register a customer order for another country (that does not usually use weekly planning) and enter the date 15-08-01 as the delivery period on your order rows.
  3. When saved, the date will be changed to 15316 in the database.
  4. When you load the order again, the date that was entered under Period will once again appear as 15-08-01, that is, the same format as you used when you placed the order.
  5. When you print an external document, for example an order confirmation, the date will appear just as you entered it.
  6. When you print an internal document, for example a list, the date will appear as 15316, which is the format used when it was saved in the database.

3. ClosedPeriod and date formats in Search Forms and Create tabs

In all Search Forms/Create tabs you can enter both period format and date format in the selection fields for period and date. This can be done regardless of which format that was selected for the period in the Settings procedure or which date format and separator that was selected for dates in the Control Panel.

Date Parser for Date and Period

There is a date parser in date and period fields used to speed up the entering of dates. The date parser is a code according to the table below. When you exit the field using Tab or Enter, the code is interpreted and the period/date is automatically entered. In saved default values for Search Forms/Create tab, you can for example use these commands to get a current default date or a current period when the procedure is opened.

Explanation of Code in Date Parser

Result

If you e.g. enter the digit 1 it will be interpreted as the first weekday of the week in question.

YYMM1

If you e.g. enter the digits 02 it will be interpreted as that day in the month in question.

YYYY-MM-02

If you enter a t (today), it will be interpreted as today's date.

YYYY-MM-DD

If you enter an m it will be interpreted as the first day of the present month.

YYYY-MM-01

If you enter an n it will be interpreted as the last day of the present month.

YYYY-MM-31

If you enter a y it will be interpreted as the first day of the present year.

YYYY-01-01

If you enter a z it will be interpreted as the last day of the present year.

YYYY-12-31

All letter alternatives can be combined with digits so that for example m-3 becomes "the first day 3 months prior to the present month", etc. If the digit is entered without any +/- sign this will be interpreted as a plus sign.

There is also a calendar in the date field that is loaded by using the button to the right of the date field (date fields in certain Search Forms/Create tabs are excluded). Today's date is marked in the calendar. You can select a certain date in the current month by clicking or you can skip between months and then select a date. The selected date will then automatically be entered in the date field.

Calendar in date field.