Syntax :
Format ( expression , "format1; format2" , firstdayofweek , firstweekofyear )
expression : specifies the data to format
format1,2, ..... : Specifies how to format expression .Multiple formats are separated by semicolons. This argument is optional.
firstdayofweek : Used when formatting dates. This arguments is optional
firstweekofyear : Used when formatting dates. This arguments is optional
Formats Available
(0) : Displays a zero or a number.
(#) : Displays a number or nothing
( . ) : Displays a decimal point. the actual decimal point is based on the regional settings
Format ( expression , "format1; format2" , firstdayofweek , firstweekofyear )
expression : specifies the data to format
format1,2, ..... : Specifies how to format expression .Multiple formats are separated by semicolons. This argument is optional.
firstdayofweek : Used when formatting dates. This arguments is optional
firstweekofyear : Used when formatting dates. This arguments is optional
Formats Available
(0) : Displays a zero or a number.
(#) : Displays a number or nothing
( . ) : Displays a decimal point. the actual decimal point is based on the regional settings
SFormat = " Currency "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " ######.00 "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " 000000.## "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " Standard "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " General Number "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " Fixed "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " Percent "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " Scientific "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " ######.00 "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " 000000.## "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " Standard "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " General Number "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " Fixed "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " Percent "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
SFormat = " Scientific "
Picture1.Print SFormat & " : " ; Tab(30) ; Format ( Val ( Text1) , SFormat )
No comments:
Post a Comment