Access: Format Function

Last updated: August 25, 2026.

The Microsoft Access Format function converts a value into a formatted string. Use it in queries, controls, reports, macros, and VBA when you need a specific date, number, currency, percentage, or text presentation.

Syntax

Format(expression, [format], [firstdayofweek], [firstweekofyear])
ArgumentDescription
expressionThe date, number, text, or other value to format.
formatOptional named format such as Long Date or a custom expression such as yyyy-mm-dd.
firstdayofweekOptional constant defining the first day of the week. The default is Sunday.
firstweekofyearOptional constant defining the first week of the year.

The last two arguments matter primarily when the format expression uses week-related symbols.

Common format expressions

FormatTypical result
yyyy-mm-dd2026-05-25
mmmm d, yyyyMay 25, 2026
#,##0.0025,748.00
0.00%74.50%
>Uppercase text
<Lowercase text

Named formats such as Currency, Long Date, and Short Date use the computer’s regional settings. Use a custom expression when the output must follow one exact pattern.

Format examples

Format(#5/25/2026#, "yyyy-mm-dd")  ' 2026-05-25
Format(0.745, "0.00%")             ' 74.50%
Format(25748, "$#,##0.00")        ' $25,748.00
Format("web cheatsheet", ">")      ' WEB CHEATSHEET

Format changes the returned display string, not the value stored in the table. Keep the original date or numeric field for sorting, filtering, and calculations.

Use Format in an Access query

SELECT
    Format([BirthDate], "yyyy-mm-dd") AS FormattedBirthDate,
    Format([Salary], "#,##0.00") AS FormattedSalary
FROM Employees;

A calculated column is useful for reports or exports. If a form or report only needs a different appearance, setting the control’s Format property is often simpler.

Use Format in VBA

Dim reportDate As String
reportDate = Format(Date, "yyyy-mm-dd")

For the complete list of symbols and named formats, see Microsoft’s Format function reference.

admin

admin

Leave a Reply

Your email address will not be published.