Description
Converts the specified dates from a given
unit to another unit.
Syntax
[Visual Basic .NET] |
Public Function ConvertDateArray( _
ByVal FromUnit As String, _
ByVal ToUnit As String, _
ByRef FromValues As System.Array _
) As System.Array
|
[Managed C++] |
public: System::Array ConvertDateArray(
String __gc ^ FromUnit,
String __gc ^ ToUnit,
System::Array ^^ FromValues
);
|
Parameters
Example
Convert multiple
dates of the same format to another format
[C#] |
Copy Code
|
IAgConversionUtility converter = root.ConversionUtility;
Array tempDates = new object[]
{
"1 Jan 2012 12:00:00.000", "1 Jan 2012 14:00:00.000"
};
Array converted = converter.ConvertDateArray("UTCG", "Epsec", ref tempDates);
for (int i = 0; i < converted.Length; i++)
{
Console.WriteLine("Date: {0}", converted.GetValue(i));
}
|
|
Convert multiple
dates of the same format to another format
[Visual Basic .NET] |
Copy Code
|
Dim converter As
IAgConversionUtility = root.ConversionUtility
#If Not CSToJava Then
#Else
#End If
Dim tempDates As Array =
New Object() {"1 Jan 2012
12:00:00.000", "1 Jan 2012
14:00:00.000"}
#If Not CSToJava Then
Dim converted As Array =
converter.ConvertDateArray("UTCG",
"Epsec", tempDates)
#Else
#End If
Dim i As
Integer = 0
While i < converted.Length
Console.WriteLine("Date: {0}", converted.GetValue(i))
System.Math.Max(System.Threading.Interlocked.Increment(i),i
- 1)
End While
|
|
See Also