HeaderPane
Main
Hide
Share Link
Print

GetTimeInfo Method, SftMaskCalendar Object

Converts a time into its components.

Syntax

C#void object.GetTimeInfo(System.DateTime Dt, out short Hours, out short Minutes, out short Seconds);
VB.NETobject.GetTimeInfo(ByVal Dt As Date, ByRef Hours As Short, ByRef Minutes As Short, ByRef Seconds As Short)
C++HRESULT object->GetTimeInfo(DATE Dt, short* Hours, short* Minutes, short* Seconds);
CHRESULT object->raw_GetTimeInfo(DATE Dt, short* Hours, short* Minutes, short* Seconds);
VBobject.GetTimeInfo(ByVal Dt As Date, Hours As Integer, Minutes As Integer, Seconds As Integer)

object

A SftMaskCalendar object.

Dt

The time to be converted.

Hours

Returns the hours as specified by Dt.

Minutes

Returns the minutes as specified by Dt.

Seconds

Returns the seconds as specified by Dt.

Comments

The GetTimeInfo method converts a time into its components.

GetTimeInfo can be used to convert a date into its hours, minutes and seconds components. Calendar.GetDateInfo is used to retrieve the date related components.

Calendar.GetTimeInfoV 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.

Examples

VB.NET View entire sample code

    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

VB6 View entire sample code

    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

C# View entire sample code

    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());
}

C++ View entire sample code

    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);
    AfxMessageBox(str);

    return TRUE;
}

See Also SftMaskCalendar Object | Object Hierarchy


Last Updated 11/03/2026 - (email)
© 2026 Softel vdm, Inc.