FullDateTimePattern Property

DateTimeFormatInfo.FullDateTimePattern Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the custom format string for a long date and long time value, which is associated with the "F" standard date and time format string.

Namespace:  System.Globalization
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Property FullDateTimePattern As String

Property Value

Type: System.String
The custom format string for a long date and long time value, which is associated with the "F" standard date and time format string.

ExceptionCondition
ArgumentNullException

An attempt was made to set the property to Nothing.

InvalidOperationException

The DateTimeFormatInfo object is read-only.

This property is affected if the value of the Calendar property changes.

The following example displays the value of FullDateTimePattern for a few cultures.


Imports System.Globalization

Public Class Example
   Public Shared Sub Demo(ByVal outputBlock As System.Windows.Controls.TextBlock)

      ' Displays the values of the pattern properties.
      outputBlock.Text &= " CULTURE    PROPERTY VALUE" & vbCrLf
      PrintPattern(outputBlock, "en-US")
      PrintPattern(outputBlock, "ar-EG")
      PrintPattern(outputBlock, "fr-FR")
   End Sub 

   Public Shared Sub PrintPattern(ByVal outputBlock As System.Windows.Controls.TextBlock, ByVal myCulture As String)
      Dim myDTFI As DateTimeFormatInfo = New CultureInfo(myCulture).DateTimeFormat
      outputBlock.Text += String.Format("  {0}     {1}", myCulture, myDTFI.FullDateTimePattern) & vbCrLf
   End Sub 
End Class  
' This example produces the following output.
'     CULTURE    PROPERTY VALUE
'      en-US     dddd, MMMM dd, yyyy h:mm:ss tt
'      ar-EG     dd MMMM, yyyy hh:mm:ss tt
'      fr-FR     dddd d MMMM yyyy HH:mm:ss


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft