Bewerken

Delen via


Date Format constants

These constants are only available when your project has an explicit reference to the appropriate type library containing these constant definitions.

Constant Value Description
vbGeneralDate 0 Display a date and/or time. For real numbers, display a date and time. If there is no fractional part, display only a date. If there is no integer part, display time only. Date and time display is determined by your system settings.
vbLongDate 1 Display a date by using the long date format specified in your computer's regional settings.
vbShortDate 2 Display a date by using the short date format specified in your computer's regional settings.
vbLongTime 3 Display a time by using the long time format specified in your computer's regional settings.
vbShortTime 4 Display a time by using the short time format specified in your computer's regional settings.

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.