Minute 函式
更新:2007 年 11 月
傳回介於 0 到 59 之間代表分鐘數的 Integer 值。
Public Function Minute(ByVal TimeValue As DateTime) As Integer
參數
- TimeValue
必要項。您希望抽出分鐘數的 Date 值。
備註
您也可以呼叫 DatePart 和指定 DateInterval.Minute 的 Interval 引數,來取得小時的分鐘數。
範例
這個範例會使用 Minute 函式,從指定時間取得小時的分鐘數。在開發環境中會使用您的程式碼中地區設定,以簡短時間格式表示時間常值。
Dim thisTime As Date
Dim thisMinute As Integer
thisTime = #4:35:17 PM#
thisMinute = Minute(thisTime)
' thisMinute now contains 35.
需求
命名空間 (Namespace)︰Microsoft.VisualBasic
**模組︰**DateAndTime
組件:Visual Basic Runtime Library (在 Microsoft.VisualBasic.dll 中)