You are here: Field Rules Reference > Field Rules Summary > SysDate

SysDate

Use this field level rule to format the system date. Using this rule you can format the system date for different localities. This rule supports overflow.

The mask area for the SysDate rule takes these values:

Format Masks

There are two types of format mask, pre-defined types 1-9 and A-Q and user-defined format arguments. If the pre-defined formats meet your needs, use them, otherwise, create a user-defined format. For information on using pre-defined format types, see Using Pre-defined Date Formats.

User- defined format arguments consist of one or more codes, each preceded by a percent sign (%). For more information on user-defined format masks, see the Setting Up Format Arguments.

Example

Assume the system date is 03-01-2009, which is a Monday, and the time is 11:57 am.

The format mask of:

d, "4/4"

formats the system date using format 4, with month spelled out, such as March 1, 2009.

To produce a Canadian French date, such as mars 1, 2009, use the following format mask:

DCAD, "4/4"

The following format, which uses format arguments, will produce the same output:

dCAD, "%B %#d, %Y"

Format arguments let you include the day of the week, hour, minute, second, and so on. This table shows you the results using various formats:

Format

Result

%m-%d-%Y

03-01-2009

The year is %Y.

The year is 2009.

Born %m/%d/%y at %I:%M %p

Born 03/01/09 at 11:57 am

%d

01

%#d

1

%A

Monday

%>A

MONDAY

%b

Mar

%<b

mar

%p

AM

%<>p

Am

 

Monday, March 01

%@CAD%A %@CAD%A, %B %d

lundi, mars 01

%A, %@CAD%B %d

Monday, mars 01

%@CAD%A, %@USD%B %d

lundi, March 01

See also