Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click ' Use the date associated with today and find its DayOfYear index. Dim todaysDate As DateTime = DateTime.Today Dim dayOfYearIndex As Integer = UltraCalendarLook.DayOfYearIndexFromMonthAndDay(todaysDate.Month, todaysDate.Day) Debug.WriteLine("The day of year index for today (" + todaysDate.ToShortDateString() + ") is: " + dayOfYearIndex.ToString()) End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void button6_Click(object sender, System.EventArgs e) { // Use todays date and find its DayOfYear index. DateTime todaysDate = DateTime.Today; int dayOfYearIndex = UltraCalendarLook.DayOfYearIndexFromMonthAndDay(todaysDate.Month, todaysDate.Day); Debug.WriteLine("The day of year index for today (" + todaysDate.ToShortDateString() + ") is: " + dayOfYearIndex.ToString()); }