Version

DateTimeFormatInfo Property (UltraCalendarCombo)

The DateTimeFormatInfo object used to handling the parsing of dates.
Syntax
'Declaration
 
Public Property DateTimeFormatInfo As DateTimeFormatInfo
public DateTimeFormatInfo DateTimeFormatInfo {get; set;}
Remarks

The DateTimeFormatInfo property is the object used to parse and format the dates. If null, the current culture's date time format info will be used.

Example
This example displays information about the control's DateTime format settings in a message box.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.CalendarCombo

    Private Sub GetFormatInfo()

        Dim info As String = String.Empty

        '	If the DateTimeFormatInfo property returns null, the current culture's
        '	DateTimeFormatInfo in in effect
        If (Not Me.ultraCalendarCombo1.DateTimeFormatInfo Is Nothing) Then
            info += "The current culture's DateTimeFormatInfo is in effect." + vbCrLf
        End If

        '	Use the DateTimeFormatInfoResolved property to get the actual
        '	DateTimeFormatInfo, which will return a valid value even when the
        '	DateTimeFormatInfo property has not been set.
        info += "The LongDatePattern is '" + Me.ultraCalendarCombo1.DateTimeFormatInfoResolved.LongDatePattern + "'" + vbCrLf
        info += "The LongTimePattern is '" + Me.ultraCalendarCombo1.DateTimeFormatInfoResolved.LongTimePattern + "'" + vbCrLf
        info += "The ShortDatePattern is '" + Me.ultraCalendarCombo1.DateTimeFormatInfoResolved.ShortDatePattern + "'" + vbCrLf
        info += "The ShortTimePattern is '" + Me.ultraCalendarCombo1.DateTimeFormatInfoResolved.ShortTimePattern + "'" + vbCrLf

        MessageBox.Show(info, "GetFormatInfo", MessageBoxButtons.OK)

    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using Infragistics.Win.UltraWinSchedule.CalendarCombo;

		private void GetFormatInfo()
		{

			string info = string.Empty;

			//	If the DateTimeFormatInfo property returns null, the current culture's
			//	DateTimeFormatInfo in in effect
			if ( this.ultraCalendarCombo1.DateTimeFormatInfo != null )
				info += "The current culture's DateTimeFormatInfo is in effect." + "\n";

			//	Use the DateTimeFormatInfoResolved property to get the actual
			//	DateTimeFormatInfo, which will return a valid value even when the
			//	DateTimeFormatInfo property has not been set.
			info += "The LongDatePattern is '" + this.ultraCalendarCombo1.DateTimeFormatInfoResolved.LongDatePattern + "'" + "\n";
			info += "The LongTimePattern is '" + this.ultraCalendarCombo1.DateTimeFormatInfoResolved.LongTimePattern + "'" + "\n";
			info += "The ShortDatePattern is '" + this.ultraCalendarCombo1.DateTimeFormatInfoResolved.ShortDatePattern + "'" + "\n";
			info += "The ShortTimePattern is '" + this.ultraCalendarCombo1.DateTimeFormatInfoResolved.ShortTimePattern + "'" + "\n";

			MessageBox.Show( info, "GetFormatInfo", MessageBoxButtons.OK );

		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also