DateTimeFormatInfo.SortableDateTimePattern プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DateTimeFormatInfo.SortableDateTimePattern プロパティの意味・解説 

DateTimeFormatInfo.SortableDateTimePattern プロパティ

"s" 形式指定文字関連付けられた並べ替え可能な日付と時刻の値の形式パターン取得します

名前空間: System.Globalization
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public ReadOnly Property
 SortableDateTimePattern As String
Dim instance As DateTimeFormatInfo
Dim value As String

value = instance.SortableDateTimePattern
public string SortableDateTimePattern { get;
 }
public:
property String^ SortableDateTimePattern {
    String^ get ();
}
/** @property */
public String get_SortableDateTimePattern ()
public function get SortableDateTimePattern
 () : String

プロパティ
"s" 形式指定文字関連付けられた並べ替え可能な日付と時刻の値の形式パターン

使用例使用例

いくつかのカルチャの SortableDateTimePattern の値を表示するコードの例次に示します

Imports System
Imports System.Globalization

Public Class SamplesDTFI

   Public Shared Sub Main()

      ' Displays the values of the pattern properties.
      Console.WriteLine(" CULTURE    PROPERTY VALUE")
      PrintPattern("en-US")
      PrintPattern("ja-JP")
      PrintPattern("fr-FR")

   End Sub 'Main

   Public Shared Sub PrintPattern(myCulture
 As [String])

      Dim myDTFI As DateTimeFormatInfo = New
 CultureInfo(myCulture, False).DateTimeFormat
      Console.WriteLine("  {0}     {1}", myCulture,
 myDTFI.SortableDateTimePattern)

   End Sub 'PrintPattern 

End Class 'SamplesDTFI

'This code produces the following output.
'
' CULTURE    PROPERTY VALUE
'  en-US     yyyy'-'MM'-'dd'T'HH':'mm':'ss
'  ja-JP     yyyy'-'MM'-'dd'T'HH':'mm':'ss
'  fr-FR     yyyy'-'MM'-'dd'T'HH':'mm':'ss
'
using System;
using System.Globalization;


public class SamplesDTFI  {

   public static void Main()
  {

      // Displays the values of the pattern properties.
      Console.WriteLine( " CULTURE    PROPERTY VALUE" );
      PrintPattern( "en-US" );
      PrintPattern( "ja-JP" );
      PrintPattern( "fr-FR" );

   }

   public static void PrintPattern(
 String myCulture )  {

      DateTimeFormatInfo myDTFI = new CultureInfo( myCulture,
 false ).DateTimeFormat;
      Console.WriteLine( "  {0}     {1}", myCulture, myDTFI.SortableDateTimePattern
 );

   }

}

/*
This code produces the following output.

 CULTURE    PROPERTY VALUE
  en-US     yyyy'-'MM'-'dd'T'HH':'mm':'ss
  ja-JP     yyyy'-'MM'-'dd'T'HH':'mm':'ss
  fr-FR     yyyy'-'MM'-'dd'T'HH':'mm':'ss

*/
using namespace System;
using namespace System::Globalization;
void PrintPattern( String^ myCulture )
{
   CultureInfo^ MyCI = gcnew CultureInfo( myCulture,false );
   DateTimeFormatInfo^ myDTFI = MyCI->DateTimeFormat;
   Console::WriteLine( " {0} {1}", myCulture, myDTFI->SortableDateTimePattern
 );
}

int main()
{
   
   // Displays the values of the pattern properties.
   Console::WriteLine( " CULTURE    PROPERTY VALUE" );
   PrintPattern( "en-US" );
   PrintPattern( "ja-JP" );
   PrintPattern( "fr-FR" );
}

/*
This code produces the following output.

CULTURE    PROPERTY VALUE
en-US     yyyy'-'MM'-'dd'T'HH':'mm':'ss
ja-JP     yyyy'-'MM'-'dd'T'HH':'mm':'ss
fr-FR     yyyy'-'MM'-'dd'T'HH':'mm':'ss

*/
import System.* ;
import System.Globalization.* ;

public class SamplesDTFI
{
    public static void main(String[]
 args)
    {
        // Displays the values of the pattern properties.
        Console.WriteLine(" CULTURE    PROPERTY VALUE");
        PrintPattern("en-US");
        PrintPattern("ja-JP");
        PrintPattern("fr-FR");
    } //main

    public static void PrintPattern(String
 myCulture)
    {
        DateTimeFormatInfo myDTFI = 
            (new CultureInfo(myCulture, false)).get_DateTimeFormat();
        
        Console.WriteLine("  {0}     {1}", myCulture, 
            myDTFI.get_SortableDateTimePattern());
    } //PrintPattern 
} //SamplesDTFI

/*
This code produces the following output.

 CULTURE    PROPERTY VALUE
  en-US     yyyy'-'MM'-'dd'T'HH':'mm':'ss
  ja-JP     yyyy'-'MM'-'dd'T'HH':'mm':'ss
  fr-FR     yyyy'-'MM'-'dd'T'HH':'mm':'ss
*/
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DateTimeFormatInfo クラス
DateTimeFormatInfo メンバ
System.Globalization 名前空間
UniversalSortableDateTimePattern



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

辞書ショートカット

すべての辞書の索引

「DateTimeFormatInfo.SortableDateTimePattern プロパティ」の関連用語

DateTimeFormatInfo.SortableDateTimePattern プロパティのお隣キーワード
検索ランキング

   

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



DateTimeFormatInfo.SortableDateTimePattern プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS