AGI STK Util 11Send comments on this topic.
ConvertDate Method (IAgConversionUtility)
See Also  Example
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
);
[Java]
public String convertDate(
   String FromUnit,
   String ToUnit,
   String FromValue
);
[Unmanaged C++]
public: HRESULT ConvertDate(
   BSTR FromUnit,
   BSTR ToUnit,
   BSTR FromValue,
   BSTR * ReturnValue
);

Parameters

FromUnit
ToUnit
FromValue

Example

Convert a date format to another format
[C#]Copy Code
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]Copy Code
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")

See Also

© 2018 Analytical Graphics, Inc. All Rights Reserved.