Sub ConvertDate(DateTimeString As String, DateTimeFormat As String, NewDateTimeFormat As String,Language As String,Country As String) As String
Dim JOLocale As JavaObject
Dim JODTConvertTo As JavaObject
Dim JODTConvertFrom As JavaObject
Dim JODate As JavaObject
JOLocale.InitializeNewInstance("java.util.Locale",Array As Object(Language,Country))
JODTConvertTo.InitializeNewInstance("java.text.SimpleDateFormat",Array As Object(NewDateTimeFormat,JOLocale))
JODTConvertFrom.InitializeNewInstance("java.text.SimpleDateFormat",Array As Object(DateTimeFormat))
JODate = JODTConvertFrom.RunMethod("parse",Array As Object(DateTimeString))
Return JODTConvertTo.RunMethod("format",Array As Object(JODate))
End Sub