Compartir a través de


DateFormat Property

Specifies the format for Date and DateTime values displayed in a text box. Available at design time and run time.

Object.DateFormat[ = nValue]

Return Value

  • nValue
    One of the following settings:

    Setting

    Description

    Format

    0

    (Default) The displayed date format is determined by the setting of SET DATE.

    Determined bySET DATE

    1

    American

    mm/dd/yy

    2

    ANSI

    yy.mm.dd

    3

    British

    dd/mm/yy

    4

    Italian

    dd-mm-yy

    5

    French

    dd/mm/yy

    6

    German

    dd.mm.yy

    7

    Japan

    yy/mm/dd

    8

    Taiwan

    yy/mm/dd

    9

    USA

    mm-dd-yy

    10

    MDY

    mm/dd/yy

    11

    DMY

    dd/mm/yy

    12

    YMD

    yy/mm/dd

    13

    Short

    Determined by the Windows Control Panel short date setting

    14

    Long

    Determined by the Windows Control Panel long date setting

Remarks

Applies To: TextBox Control (Visual FoxPro)

A Date or DateTime value displayed in a text box may be displayed in a different format when the text box does not have the focus. Certain short and long date formats that you can specify in the Windows Control Panel do not correspond to valid Visual FoxPro formats, and are displayed in a default format.

The Format property overrides the DateFormat property when the YS, YL, E, or D settings are specified for the Format property.

See Also

Reference

Century Property

DateMark Property

Hours Property

Seconds Property

SET DATE Command

StrictDateEntry Property

Other Resources

Properties (Visual FoxPro)

Language Reference (Visual FoxPro)