SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Converts a date into its components.
VB.NET | object.GetDateInfo(ByVal Dt As Date, ByRef Year As Short, ByRef Month As Short, ByRef Day As Short, ByRef DayOfWeek As Short) |
VB | object.GetDateInfo(ByVal Dt As Date, Year As Integer, Month As Integer, Day As Integer, DayOfWeek As Integer) |
C#.NET | void object.GetDateInfo(System.DateTime Dt, out short Year, out short Month, out short Day, out short DayOfWeek); |
VC++ | HRESULT object->GetDateInfo(DATE Dt, short* Year, short* Month, short* Day, short* DayOfWeek); |
C | HRESULT object->raw_GetDateInfo(DATE Dt, short* Year, short* Month, short* Day, short* DayOfWeek); |
object
Dt
The date to be converted.
Year
Returns the year as specified by Dt.
Month
Returns the month as specified by Dt, a value in the range 1-12.
Day
Returns the day as specified by Dt, a value in the range 1-31.
DayOfWeek
Returns the day of the week (Sunday = 0, Monday = 1, etc.).
The GetDateInfo method converts a date into its components.
GetDateInfo can be used to convert a date into its month, day, year components. Calendar.GetTimeInfo is used to retrieve the time related components.
Calendar.GetDateInfoV is used for languages such as VBScript, which are limited by requiring Variant arguments and do not support strongly typed arguments for return values. For more information please see Using SftMask/OCX with Internet Explorer.
Text = "" AxSftMask1.Calendar.FormatTime(#5:01:59 PM#, Text) MsgBox(Text) Text = "'Hour='H 'Mins='m 'Secs='s" AxSftMask1.Calendar.FormatTime(#5:01:59 PM#, Text) MsgBox(Text) Dim Year As Integer, Month As Integer, Day As Integer, DayOfWeek As Integer AxSftMask1.Calendar.GetDateInfo(#7/14/2006 5:49:23 PM#, Year, Month, Day, DayOfWeek) MsgBox("Year=" & Year & " Month=" & Month & " Day=" & Day & " DayOfWeek=" & DayOfWeek) Dim Hours As Integer, Minutes As Integer, Seconds As Integer AxSftMask1.Calendar.GetTimeInfo(#7/14/2002 5:49:23 PM#, Hours, Minutes, Seconds) MsgBox("Hours=" & Hours & " Minutes=" & Minutes & " Seconds=" & Seconds) End Sub
Text = "" SftMask1.Calendar.FormatTime #5:01:59 PM#, Text MsgBox (Text) Text = "'Hour='H 'Mins='m 'Secs='s" SftMask1.Calendar.FormatTime #5:01:59 PM#, Text MsgBox (Text) Dim Year As Integer, Month As Integer, Day As Integer, DayOfWeek As Integer SftMask1.Calendar.GetDateInfo #7/14/2006 5:49:23 PM#, Year, Month, Day, DayOfWeek MsgBox ("Year=" & Year & " Month=" & Month & " Day=" & Day & " DayOfWeek=" & DayOfWeek) Dim Hours As Integer, Minutes As Integer, Seconds As Integer SftMask1.Calendar.GetTimeInfo #7/14/2002 5:49:23 PM#, Hours, Minutes, Seconds MsgBox ("Hours=" & Hours & " Minutes=" & Minutes & " Seconds=" & Seconds) End Sub
Text = ""; axSftMask1.Calendar.FormatTime(new DateTime(2000, 8, 1, 5, 1, 59), ref Text); MessageBox.Show(Text); Text = "'Hour='H 'Mins='m 'Secs='s"; axSftMask1.Calendar.FormatTime(new DateTime(2000, 8, 1, 5, 1, 59), ref Text); MessageBox.Show(Text); short Year, Month, Day, DayOfWeek; axSftMask1.Calendar.GetDateInfo(new DateTime(2006, 7, 14, 5, 49, 23), out Year, out Month, out Day, out DayOfWeek); MessageBox.Show("Year=" + Year.ToString() + " Month=" + Month.ToString() + " Day=" + Day.ToString() + " DayOfWeek=" + DayOfWeek.ToString()); short Hours, Minutes, Seconds; axSftMask1.Calendar.GetTimeInfo(new DateTime(2006, 7, 14, 5, 49, 23), out Hours, out Minutes, out Seconds); MessageBox.Show("Hours=" + Hours.ToString() + " Minutes=" + Minutes.ToString() + " Seconds=" + Seconds.ToString()); }
m_pMask1->Calendar->FormatTime(COleDateTime(2000, 8, 1, 5, 1, 59), &FmtVal); AfxMessageBox(CString(FmtVal)); FmtVal = _T("'Hour='H 'Mins='m 'Secs='s"); m_pMask1->Calendar->FormatTime(COleDateTime(2000, 8, 1, 5, 1, 59), &FmtVal); AfxMessageBox(CString(FmtVal)); short Year, Month, Day, DayOfWeek; m_pMask1->Calendar->GetDateInfo(COleDateTime(2000, 7, 14, 5,49,23), &Year, &Month, &Day, &DayOfWeek); CString str; str.Format(_T("Year=%d Month=%d Day=%d DayOfWeek=%d"), Year, Month, Day, DayOfWeek); AfxMessageBox(str); short Hours, Minutes, Seconds; m_pMask1->Calendar->GetTimeInfo(COleDateTime(2000, 7, 14, 5,49,23), &Hours, &Minutes, &Seconds); str.Format(_T("Hours=%d Minutes=%d Seconds=%d"), Hours, Minutes, Seconds);
See Also SftMaskCalendar Object | Object Hierarchy