STK UtilSend comments on this topic.
ConvertDate Method (IAgConversionUtility)
See Also
FromUnit
ToUnit
FromValue
Windows





Windows & Linux

Description

Converts the specified date from a given unit to another unit.

Syntax

[Visual Basic .NET]
Public Function ConvertDate( _
    ByVal FromUnit As String, _
    ByVal ToUnit As String, _
    ByVal FromValue As String _
) As String
[C#]
public string ConvertDate(
    string FromUnit,
    string ToUnit,
    string FromValue
);
[Managed C++]
public: String __gc ^ ConvertDate(
    String __gc ^ FromUnit,
    String __gc ^ ToUnit,
    String __gc ^ FromValue
);
[Unmanaged C++]
public: HRESULT ConvertDate(
    BSTR FromUnit,
    BSTR ToUnit,
    BSTR FromValue,
    BSTR * pToValue
);
[Java]
public String convertDate(
    String FromUnit,
    String ToUnit,
    String FromValue
);
[Python - STK API ]
def ConvertDate(self, FromUnit:str, ToUnit:str, FromValue:str) -> str:

Parameters

FromUnit
ToUnit
FromValue

See Also

Example

Convert a date format to another format
[C#]
IAgConversionUtility converter = root.ConversionUtility;

// Individually
string epsec = converter.ConvertDate("UTCG", "Epsec", "1 Jan 2012 12:00:00.000");
string utcg = converter.ConvertDate("EpSec", "UTCG", "230126401.000");
Convert a date format to another format
[Visual Basic .NET]
Dim converter As IAgConversionUtility = root.ConversionUtility

' Individually
Dim epsec As String = converter.ConvertDate("UTCG", "Epsec", "1 Jan 2012 12:00:00.000")
Dim utcg As String = converter.ConvertDate("EpSec", "UTCG", "230126401.000")
© 2024 Analytical Graphics, Inc. All Rights Reserved.