ManagementDateTimeConverter.ToDmtfTimeInterval メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ManagementDateTimeConverter.ToDmtfTimeInterval メソッドの意味・解説 

ManagementDateTimeConverter.ToDmtfTimeInterval メソッド

指定されTimeSpanDMTF 時間間隔変換します

名前空間: System.Management
アセンブリ: System.Management (system.management.dll 内)
構文構文

Public Shared Function ToDmtfTimeInterval
 ( _
    timespan As TimeSpan _
) As String
Dim timespan As TimeSpan
Dim returnValue As String

returnValue = ManagementDateTimeConverter.ToDmtfTimeInterval(timespan)
public static string ToDmtfTimeInterval
 (
    TimeSpan timespan
)
public:
static String^ ToDmtfTimeInterval (
    TimeSpan timespan
)
public static String ToDmtfTimeInterval (
    TimeSpan timespan
)
public static function ToDmtfTimeInterval
 (
    timespan : TimeSpan
) : String

パラメータ

timespan

DMTF 時間間隔変換する日付時刻を表す TimeSpan。

戻り値
指定されTimeSpanDMTF 時間間隔を表す文字列。

解説解説
使用例使用例

指定されTimeSpanDMTF 時間間隔変換する例を次に示します

Imports System
Imports System.Management

'The sample below demonstrates the various conversions
' that can be done using ManagementDateTimeConverter class    
Class Sample_ManagementClass
    Public Overloads Shared
 Function Main(ByVal args() As
 String) _
        As Integer
        Dim dmtfDate As String
 = "20020408141835.999999-420"
        Dim dmtfTimeInterval As String
 = "00000010122532:123456:000"

        'Converting DMTF datetime and intervals to System.DateTime
        Dim dt As DateTime = _
            ManagementDateTimeConverter.ToDateTime(dmtfDate)

        'Converting System.DateTime to DMTF datetime
        dmtfDate = _
            ManagementDateTimeConverter.ToDmtfDateTime(DateTime.Now)

        ' Converting DMTF timeinterval to System.TimeSpan
        Dim tsRet As System.TimeSpan = _
            ManagementDateTimeConverter.ToTimeSpan(dmtfTimeInterval)

        'Converting System.TimeSpan to DMTF time interval format
        Dim ts As System.TimeSpan = _
            New System.TimeSpan(10, 12, 25, 32, 456)
        Dim dmtfTimeInt As String
        dmtfTimeInt = _
            ManagementDateTimeConverter.ToDmtfTimeInterval(ts)

        Return 0
    End Function
End Class
using System;
using System.Management;

// The sample below demonstrates the various conversions
// that can be done using ManagementDateTimeConverter class    
class Sample_ManagementDateTimeConverterClass
{
    public static int Main(string[]
 args) 
    {
        string dmtfDate = "20020408141835.999999-420";
        string dmtfTimeInterval = "00000010122532:123456:000";
        
        // Converting DMTF datetime to System.DateTime
        DateTime dt = 
            ManagementDateTimeConverter.ToDateTime(dmtfDate);
   
        // Converting System.DateTime to DMTF datetime
        string dmtfDateTime = 
            ManagementDateTimeConverter.ToDmtfDateTime(DateTime.Now);

        // Converting DMTF time interval to System.TimeSpan
        System.TimeSpan tsRet = 
            ManagementDateTimeConverter.ToTimeSpan(dmtfTimeInterval);

        //Converting System.TimeSpan to DMTF time interval format
        System.TimeSpan ts = 
            new System.TimeSpan(10,12,25,32,456);
        string dmtfTimeInt  = 
            ManagementDateTimeConverter.ToDmtfTimeInterval(ts);
        
        return 0;
    }
}
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ManagementDateTimeConverter クラス
ManagementDateTimeConverter メンバ
System.Management 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からManagementDateTimeConverter.ToDmtfTimeInterval メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からManagementDateTimeConverter.ToDmtfTimeInterval メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からManagementDateTimeConverter.ToDmtfTimeInterval メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

ManagementDateTimeConverter.ToDmtfTimeInterval メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ManagementDateTimeConverter.ToDmtfTimeInterval メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS