Flag This Hub

MS Access Format Function

By


In Access, the Format function takes an expression and returns it as a formatted string.

The syntax for the Format function is:

Format ( expression, [ format ] )

expression is the value to format.

format is optional. It is the format to apply to the expression. You can either define your own format or use one of the named formats that Access has predefined.

Examples

Format (210.6, "#,##0.00") would return '210.60'

Format (210.6, "Standard") would return '210.60'

Format (0.981, "Percent") would return '98.10%'

Format (1267.5, "Currency") would return '$1,267.50'

Format (#17/04/2004#, "Short Date") would return '17/04/2004'

Format (#17/04/2004#, "Long Date") would return 'April 17, 2004'

Format (#17/04/2004#, "yyyy/mm/dd") would return '2004/04/17'

Comments

Ala'a 2 years ago

thank

i have a program that have the currency in field and the value in another field.

i want formate as GBP 44,678.00

julio iglesia 2 years ago

nice i like that

Submit a Comment
Members and Guests

Sign in or sign up and post using a hubpages account.



    Like this Hub?
    Please wait working