Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

傳回代表數字之八進位值的 Variant (String)。

語法

10 月 ( 日號碼 )

必要 數位引數 為任何有效的 數值運算式 或 字串運算式。

註解

如果 number 還不是整數,則會先四捨五入至最接近的整數,然後再進行評估。

如果 number

10 月退貨

Null

Null

空白

零 (0)

任何其他數位

最多11個八進位字元

您可以在適當的範圍中使用 &O,直接以上述數位來表示八進位數位。 例如, &O10 是十進位 8 的八進位表示法。

查詢範例

Expression

結果​​

SELECT Oct (2) AS 表達式1 FROM ProductSales GROUP BY Oct (2) ;

傳回 「2」的八進位值,並在表達式1 欄中顯示結果。

SELECT quantity,Oct (quantity) AS 表達式1 FROM ProductSales;

傳回來自「數量」的值,以及「數量」欄中所有數據值的八進位值。 傳回來自「數量」的值,以及「數量」欄中所有數據值的八進位值,並在「OctValue」欄中顯示結果。

VBA 範例

附註: 下列範例示範如何在 Visual Basic for Applications (VBA) 模組中使用此函數。 如需使用 VBA 的詳細資訊,請在 [搜尋] 旁的下拉式清單中選取 [開發人員參考],並在 [搜尋] 方塊中輸入一個或多個字詞。

此範例使用 Oct 函數傳回數位的八進位值。

Dim MyOct
MyOct = Oct(4) ' Returns 4.
MyOct = Oct(8) ' Returns 10.
MyOct = Oct(459) ' Returns 713.

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×