Date/Time fields

Date/Time fields display time and date information in a variety of formats. You can define a date or time field as editable by the user, or you can choose a computed option so the user cannot change the field value.

Dates may range from 1/1/0001 through 12/31/9999. Entering two-digit years between 00 and 49 assumes the century starting in the year 2000. Entering two-digit years between 50 and 99 assumes the century starting in the year 1900. If you want users to enter a four-digit year in the field, on the Control tab of the Field Properties box, select On input "Require user to enter four digit years."

Times may range from 00:00:00:00 through 23:59:59:59 in the 24-hour format and from 12:00:00 AM through 11:59:59 PM in the 12-hour format.

Choosing a Date/Time format

On the Control tab of the Field properties box, you select the format for the display of the Date/Time field. You can choose to use the date/time display based on the current user settings, or you can customize the display.

To display a date

  1. Select or create a Date/Time field.
  2. On the Control tab, choose one of the following next to "Use preferences from":
    • "User setting" to use the preferences from the user's workstation.
    • "Custom" to customize the display.
      Tip: If you are creating a custom Date/Time field, make sure to test your application with the user preference "Strict Date/Time Input" checked and with it unchecked (File - Preferences - User Preferences).

    Also, if you are creating a custom Date/Time field, you may want to include field help text (Advanced tab of the Field Properties box) to describe how the user should enter the date. You may want to provide a brief example as part of the help text.

  3. Check "Display Date" and then choose date options. As you select options, the sample will change to show you what the user will see.

    The following are the display date options:

    Show:

    • All
    • Only month, day, and year
    • Only weekday, month, and day
    • Only month and year
    • Only month and day
    • Only year
    • Only month
    • Only day
    • Only weekday

    Special:

    • Show "today" when appropriate
    • Always show 4 digit year
    • Show 4 digit year for the 21st century

      Note that this setting takes precedence over 2-digit year formats chosen elsewhere in the Control tab of the Field properties box.

    • Show year only if not this year

    Calendar:

    • Gregorian calendar
    • Hijri calendar

    Format (appears if you selected Custom):

    • YMDW - Year, month, day, weekday. For example, 98 12/17/Thu.
    • WMDY - Weekday, month, day, year. For example, Thu 12/17/98.
    • WDMY - Weekday, day, month, year. For example, Thu 17/12/98.

    Separators (appears if you selected Custom):

    • Enter the separators to use between the day, month, and year. For example, you can enter backslashes (/) to present the date as 06/06/02.

      Note that if you specify a comma as a date separator (for example: 11,15,98) then you must use a semicolon if you are separating multiple dates in a list (for example: 11,15,98; 12,15,98; 1,15,99). If you specify a semicolon as the date separator, then you must use a comma to separate multiple values in the list.

    Day, Month, Year, Weekday:

    • Choose a format for the day, month, year, and weekday from the drop-down lists.

To display a time

  1. Select or create a Date/Time field.
  2. On the Control tab, choose one of the following from "Use preferences from":
    • "User setting" to use the preferences from the user's workstation.
    • "Custom" to customize the display.
  3. Check "Display Time" and then choose display time options. As you select options, the sample will change to show you what the user will see.

    The following are the display time options:

    Show:

    • All
    • Hours, minutes, and seconds
    • Hours and minutes
    • Hours only

    Time zone:

    • Adjust time to local zone - Displays the time relative to the time zone in which the document was created.

      For example, if the document was created at 3:00 PM in Boston and is read by a user in Los Angeles, the creation time is adjusted to the Pacific U.S. time zone and displays as 12:00 PM.

    • Always show time zone - Displays the zone in which the document was created as a part of the value.

      In this case, the time itself is not adjusted for the reader's time zone; instead, Notes® displays the creator's time zone. For example, if the document was created in Boston at 3:00 PM, the user in Los Angeles sees the creation time as "3:00 PM EST."

    • Show only if zone not local - Displays the zone in which the document was created only if the document was created in a different time zone than it is being viewed in.

      For example, if the document was created in Boston at 3:00 PM, users in the U.S. Eastern standard time zone see the creation date as "3:00 PM," while users in other time zones see the creation date as "3:00 PM EST."

      To take advantage of time zone options, note that the date must be included in the field.

    Format (appears if you selected Custom):

    • 12 hour
    • 24 hour

    Separator (appears if you selected Custom):

    • Enter the separator to use between the hours, minutes, and seconds. For example, if you enter a colon (:), the time appears as 11:52:35 AM.

To show both date and time together in the same field, select both "Display Date" and "Display Time."